williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: inline void CLineReader::SetPlugIn(MVersitPlugIn* aPlugIn) williamr@2: /** Sets the plug-in. williamr@2: williamr@2: Allows implemented functions of the MVersitPlugIn class to be used in specifying williamr@2: options for adding and deleting spaces to/from the buffer. williamr@2: williamr@2: Specifically, the plug-in is used to determine whether an additional space should williamr@2: be added when appending a line to the buffer (by default a space will be added), williamr@2: and whether the white space at the start of a line should form part of the data williamr@2: (by default it will not form part of the data). williamr@2: williamr@2: Using a plug-in is optional. williamr@2: williamr@2: @param aPlugIn A pointer to an MVersitPlugIn instance. */ williamr@2: {iPlugIn=aPlugIn;} williamr@2: williamr@2: inline void CLineReader::SetSkipWhiteSpaceAtStart(TBool aDoSkip) williamr@2: {iSkipWhiteSpaceAtStart=aDoSkip;} williamr@2: williamr@2: inline void CVersitParser::SetObserver(MVersitObserver* aObserver) williamr@2: /** Sets the Versit observer. williamr@2: williamr@2: @param aObserver A pointer to the observer. */ williamr@2: {iObserver=aObserver;} williamr@2: williamr@2: inline MVersitObserver* CVersitParser::Observer() williamr@2: /** Gets a pointer to the Versit observer. williamr@2: williamr@2: @return A pointer to the observer. */ williamr@2: {return iObserver;} williamr@2: williamr@2: inline void CVersitParser::SetPlugIn(MVersitPlugIn* aPlugIn) williamr@2: /** Sets the Versit plug-in. williamr@2: williamr@2: If there is one, the Versit plug-in needs to be set before any properties are williamr@2: added to the parser. This is done for you when internalising (using InternalizeL()) williamr@2: or adding properties (using AddPropertyL()). williamr@2: williamr@2: @param aPlugIn A pointer to the plug in. */ williamr@2: {iPlugIn=aPlugIn;} williamr@2: williamr@2: inline MVersitPlugIn* CVersitParser::PlugIn() williamr@2: /** Gets a pointer to the Versit plug-in. williamr@2: williamr@2: @return A pointer to the plug-in. */ williamr@2: {return iPlugIn;} williamr@2: williamr@2: /* Gets a pointer to the read buffer owned by the CLineReader. williamr@2: * williamr@2: * @return Pointer to the read buffer. */ williamr@2: inline TPtr8& CVersitParser::BufPtr() williamr@2: {return iLineReader->iBufPtr;} williamr@2: williamr@2: /* williamr@2: * Check the iFlags to see if ESupportsVersion is set williamr@2: * williamr@2: * @return " TBool " williamr@2: * ETrue if the parser supports the version property williamr@2: * EFalse otherwise williamr@2: */ williamr@2: inline TBool CVersitParser::SupportsVersion() const williamr@2: {return iFlags & ESupportsVersion;} williamr@2: williamr@2: /* williamr@2: * Sets the iFlags to ESupportsVersion williamr@2: */ williamr@2: inline void CVersitParser::SetSupportsVersion() williamr@2: {iFlags |= ESupportsVersion;} williamr@2: williamr@2: /* williamr@2: * Clear the bit of ESupportsVersion in iFlags' williamr@2: */ williamr@2: inline void CVersitParser::ClearSupportsVersion() williamr@2: {iFlags &= ~ESupportsVersion;} williamr@2: williamr@2: /* williamr@2: * Set Flags williamr@2: */ williamr@2: inline void CVersitParser::SetFlags(TUint aFlags) williamr@2: {iFlags |= aFlags;} williamr@2: williamr@2: /* williamr@2: * Gets a reference to CVersitUnicodeUtils williamr@2: * which is used for charset conversion williamr@2: * williamr@2: * @return " CVersitUnicodeUtils&" williamr@2: * reference to CVersitUnicodeUtils williamr@2: */ williamr@2: inline CVersitUnicodeUtils& CVersitParser::UnicodeUtils() williamr@2: { return iStaticUtils->UnicodeUtils(); }