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