1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 inline void CLineReader::SetPlugIn(MVersitPlugIn* aPlugIn)
19 Allows implemented functions of the MVersitPlugIn class to be used in specifying
20 options for adding and deleting spaces to/from the buffer.
22 Specifically, the plug-in is used to determine whether an additional space should
23 be added when appending a line to the buffer (by default a space will be added),
24 and whether the white space at the start of a line should form part of the data
25 (by default it will not form part of the data).
27 Using a plug-in is optional.
29 @param aPlugIn A pointer to an MVersitPlugIn instance. */
32 inline void CLineReader::SetSkipWhiteSpaceAtStart(TBool aDoSkip)
33 {iSkipWhiteSpaceAtStart=aDoSkip;}
35 inline void CVersitParser::SetObserver(MVersitObserver* aObserver)
36 /** Sets the Versit observer.
38 @param aObserver A pointer to the observer. */
39 {iObserver=aObserver;}
41 inline MVersitObserver* CVersitParser::Observer()
42 /** Gets a pointer to the Versit observer.
44 @return A pointer to the observer. */
47 inline void CVersitParser::SetPlugIn(MVersitPlugIn* aPlugIn)
48 /** Sets the Versit plug-in.
50 If there is one, the Versit plug-in needs to be set before any properties are
51 added to the parser. This is done for you when internalising (using InternalizeL())
52 or adding properties (using AddPropertyL()).
54 @param aPlugIn A pointer to the plug in. */
57 inline MVersitPlugIn* CVersitParser::PlugIn()
58 /** Gets a pointer to the Versit plug-in.
60 @return A pointer to the plug-in. */
63 /* Gets a pointer to the read buffer owned by the CLineReader.
65 * @return Pointer to the read buffer. */
66 inline TPtr8& CVersitParser::BufPtr()
67 {return iLineReader->iBufPtr;}
70 * Check the iFlags to see if <code>ESupportsVersion</code> is set
73 * <code>ETrue</code> if the parser supports the version property
74 * <code>EFalse</code> otherwise
76 inline TBool CVersitParser::SupportsVersion() const
77 {return iFlags & ESupportsVersion;}
80 * Sets the iFlags to <code>ESupportsVersion</code>
82 inline void CVersitParser::SetSupportsVersion()
83 {iFlags |= ESupportsVersion;}
86 * Clear the bit of <code>ESupportsVersion</code> in iFlags'
88 inline void CVersitParser::ClearSupportsVersion()
89 {iFlags &= ~ESupportsVersion;}
94 inline void CVersitParser::SetFlags(TUint aFlags)
98 * Gets a reference to <code>CVersitUnicodeUtils</code>
99 * which is used for charset conversion
101 * @return " CVersitUnicodeUtils&"
102 * reference to <code>CVersitUnicodeUtils</code>
104 inline CVersitUnicodeUtils& CVersitParser::UnicodeUtils()
105 { return iStaticUtils->UnicodeUtils(); }