author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 3 | e1b950c65cb4 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@4 | 4 |
// under the terms of "Eclipse Public License v1.0" |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@4 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
inline void CLineReader::SetPlugIn(MVersitPlugIn* aPlugIn) |
williamr@2 | 17 |
/** Sets the plug-in. |
williamr@2 | 18 |
|
williamr@2 | 19 |
Allows implemented functions of the MVersitPlugIn class to be used in specifying |
williamr@2 | 20 |
options for adding and deleting spaces to/from the buffer. |
williamr@2 | 21 |
|
williamr@2 | 22 |
Specifically, the plug-in is used to determine whether an additional space should |
williamr@2 | 23 |
be added when appending a line to the buffer (by default a space will be added), |
williamr@2 | 24 |
and whether the white space at the start of a line should form part of the data |
williamr@2 | 25 |
(by default it will not form part of the data). |
williamr@2 | 26 |
|
williamr@2 | 27 |
Using a plug-in is optional. |
williamr@2 | 28 |
|
williamr@2 | 29 |
@param aPlugIn A pointer to an MVersitPlugIn instance. */ |
williamr@2 | 30 |
{iPlugIn=aPlugIn;} |
williamr@2 | 31 |
|
williamr@2 | 32 |
inline void CLineReader::SetSkipWhiteSpaceAtStart(TBool aDoSkip) |
williamr@2 | 33 |
{iSkipWhiteSpaceAtStart=aDoSkip;} |
williamr@2 | 34 |
|
williamr@2 | 35 |
inline void CVersitParser::SetObserver(MVersitObserver* aObserver) |
williamr@2 | 36 |
/** Sets the Versit observer. |
williamr@2 | 37 |
|
williamr@2 | 38 |
@param aObserver A pointer to the observer. */ |
williamr@2 | 39 |
{iObserver=aObserver;} |
williamr@2 | 40 |
|
williamr@2 | 41 |
inline MVersitObserver* CVersitParser::Observer() |
williamr@2 | 42 |
/** Gets a pointer to the Versit observer. |
williamr@2 | 43 |
|
williamr@2 | 44 |
@return A pointer to the observer. */ |
williamr@2 | 45 |
{return iObserver;} |
williamr@2 | 46 |
|
williamr@2 | 47 |
inline void CVersitParser::SetPlugIn(MVersitPlugIn* aPlugIn) |
williamr@2 | 48 |
/** Sets the Versit plug-in. |
williamr@2 | 49 |
|
williamr@2 | 50 |
If there is one, the Versit plug-in needs to be set before any properties are |
williamr@2 | 51 |
added to the parser. This is done for you when internalising (using InternalizeL()) |
williamr@2 | 52 |
or adding properties (using AddPropertyL()). |
williamr@2 | 53 |
|
williamr@2 | 54 |
@param aPlugIn A pointer to the plug in. */ |
williamr@2 | 55 |
{iPlugIn=aPlugIn;} |
williamr@2 | 56 |
|
williamr@2 | 57 |
inline MVersitPlugIn* CVersitParser::PlugIn() |
williamr@2 | 58 |
/** Gets a pointer to the Versit plug-in. |
williamr@2 | 59 |
|
williamr@2 | 60 |
@return A pointer to the plug-in. */ |
williamr@2 | 61 |
{return iPlugIn;} |
williamr@2 | 62 |
|
williamr@2 | 63 |
/* Gets a pointer to the read buffer owned by the CLineReader. |
williamr@2 | 64 |
* |
williamr@2 | 65 |
* @return Pointer to the read buffer. */ |
williamr@2 | 66 |
inline TPtr8& CVersitParser::BufPtr() |
williamr@2 | 67 |
{return iLineReader->iBufPtr;} |
williamr@2 | 68 |
|
williamr@2 | 69 |
/* |
williamr@2 | 70 |
* Check the iFlags to see if <code>ESupportsVersion</code> is set |
williamr@2 | 71 |
* |
williamr@2 | 72 |
* @return " TBool " |
williamr@2 | 73 |
* <code>ETrue</code> if the parser supports the version property |
williamr@2 | 74 |
* <code>EFalse</code> otherwise |
williamr@2 | 75 |
*/ |
williamr@2 | 76 |
inline TBool CVersitParser::SupportsVersion() const |
williamr@2 | 77 |
{return iFlags & ESupportsVersion;} |
williamr@2 | 78 |
|
williamr@2 | 79 |
/* |
williamr@2 | 80 |
* Sets the iFlags to <code>ESupportsVersion</code> |
williamr@2 | 81 |
*/ |
williamr@2 | 82 |
inline void CVersitParser::SetSupportsVersion() |
williamr@2 | 83 |
{iFlags |= ESupportsVersion;} |
williamr@2 | 84 |
|
williamr@2 | 85 |
/* |
williamr@2 | 86 |
* Clear the bit of <code>ESupportsVersion</code> in iFlags' |
williamr@2 | 87 |
*/ |
williamr@2 | 88 |
inline void CVersitParser::ClearSupportsVersion() |
williamr@2 | 89 |
{iFlags &= ~ESupportsVersion;} |
williamr@2 | 90 |
|
williamr@2 | 91 |
/* |
williamr@2 | 92 |
* Set Flags |
williamr@2 | 93 |
*/ |
williamr@2 | 94 |
inline void CVersitParser::SetFlags(TUint aFlags) |
williamr@2 | 95 |
{iFlags |= aFlags;} |
williamr@2 | 96 |
|
williamr@2 | 97 |
/* |
williamr@2 | 98 |
* Gets a reference to <code>CVersitUnicodeUtils</code> |
williamr@2 | 99 |
* which is used for charset conversion |
williamr@2 | 100 |
* |
williamr@2 | 101 |
* @return " CVersitUnicodeUtils&" |
williamr@2 | 102 |
* reference to <code>CVersitUnicodeUtils</code> |
williamr@2 | 103 |
*/ |
williamr@2 | 104 |
inline CVersitUnicodeUtils& CVersitParser::UnicodeUtils() |
williamr@2 | 105 |
{ return iStaticUtils->UnicodeUtils(); } |