CStifSectionParser Class Reference
class CStifSectionParser : public CBase
|
Public Member Functions
|
|
~CStifSectionParser
()
|
const
TPtrC
|
Des
()
|
IMPORT_C
CStifItemParser
*
|
GetItemLineL
(const
TDesC
&,
TTagToReturnValue
)
|
IMPORT_C
TInt
|
GetLine
(const
TDesC
&,
TPtrC
&,
TTagToReturnValue
)
|
IMPORT_C
CStifItemParser
*
|
GetNextItemLineL
()
|
IMPORT_C
CStifItemParser
*
|
GetNextItemLineL
(const
TDesC
&,
TTagToReturnValue
)
|
IMPORT_C
TInt
|
GetNextLine
(
TPtrC
&)
|
IMPORT_C
TInt
|
GetNextLine
(const
TDesC
&,
TPtrC
&,
TTagToReturnValue
)
|
IMPORT_C
TInt
|
GetPosition
()
|
CStifSectionParser
*
|
NewL
(const
TInt
)
|
IMPORT_C
CStifSectionParser
*
|
NextSubSectionL
(const
TDesC
&, const
TDesC
&,
TInt
)
|
void
|
SetData
(
TPtr
,
TInt
,
TInt
)
|
IMPORT_C
TInt
|
SetPosition
(
TInt
)
|
IMPORT_C
CStifSectionParser
*
|
SubSectionL
(const
TDesC
&, const
TDesC
&,
TInt
)
|
Constructor & Destructor Documentation
CStifSectionParser(const TInt)
CStifSectionParser
|
(
|
const
TInt
|
aLength
|
)
|
[private]
|
Member Functions Documentation
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
By default Symbian OS constructor is private.
Des()
Returns a current section.
FindTag(const TDesC &, const TDesC &, TInt &, TInt &)
Searches for selected tag in a text.
GetItemLineL(const TDesC &, TTagToReturnValue)
IMPORT_C
CStifItemParser
*
|
GetItemLineL
|
(
|
const
TDesC
&
|
aTag,
|
|
TTagToReturnValue
|
aTagIndicator = ETag
|
|
)
|
|
Parses a line for items parsing with a tag. Returns a
CStifItemParser
object. If start tag is empty the parsing starts beging of the section. TTagToReturnValue indicates will also the aTag value (if exist) include to the returned object(For default the tag will be added).
Parameters
const
TDesC
& aTag
|
|
TTagToReturnValue
aTagIndicator = ETag
|
|
GetLine(const TDesC &, TPtrC &, TTagToReturnValue)
IMPORT_C
TInt
|
GetLine
|
(
|
const
TDesC
&
|
aTag,
|
|
TPtrC
&
|
aLine,
|
|
TTagToReturnValue
|
aTagIndicator = ETag
|
|
)
|
|
Get a line from section with a tag. Returns an error code and a reference to the parsed line. If start tag is empty the parsing starts beging of the section. TTagToReturnValue indicates will also the aTag value(if exist) include to the aLine reference(For default the tag will be added).
Parameters
const
TDesC
& aTag
|
|
TPtrC
& aLine
|
|
TTagToReturnValue
aTagIndicator = ETag
|
|
GetNextItemLineL(const TDesC &, TTagToReturnValue)
IMPORT_C
CStifItemParser
*
|
GetNextItemLineL
|
(
|
const
TDesC
&
|
aTag,
|
|
TTagToReturnValue
|
aTagIndicator = ETag
|
|
)
|
|
Parses a next line for items parsing with a tag. Returns a
CStifItemParser
object. If start tag is empty the parsing starts beging of the section. TTagToReturnValue indicates will also the aTag value (if exist) include to the returned object(For default the tag will be added).
Parameters
const
TDesC
& aTag
|
|
TTagToReturnValue
aTagIndicator = ETag
|
|
GetNextLine(TPtrC &)
Get next line. Returns an error code and a reference to the parsed line.
GetNextLine(const TDesC &, TPtrC &, TTagToReturnValue)
IMPORT_C
TInt
|
GetNextLine
|
(
|
const
TDesC
&
|
aTag,
|
|
TPtrC
&
|
aLine,
|
|
TTagToReturnValue
|
aTagIndicator = ETag
|
|
)
|
|
Get next line with tag. Returns an error code and a reference to the parsed line. If start tag is empty the parsing starts beging of the section. TTagToReturnValue indicates will also the aTag value(if exist) include to the aLine reference(For default the tag will be added).
Parameters
const
TDesC
& aTag
|
|
TPtrC
& aLine
|
|
TTagToReturnValue
aTagIndicator = ETag
|
|
GetPosition()
IMPORT_C
TInt
|
GetPosition
|
(
|
)
|
|
Get current position. Returns current parsing position, which can be used as parameter for SetPosition afterwards to go back to old parsing position.
GotoEndOfLine(TLex &)
TInt
|
GotoEndOfLine
|
(
|
TLex
&
|
lex
|
)
|
[private]
|
Generic search for end-of-line. Returns position before linefeed and lex is posotioned to the beginning of next line.
NextSubSectionL(const TDesC &, const TDesC &, TInt)
Parses a next subsections from the main section with a start and with a end tag. Returns a
CStifSectionParser
object. If start tag is empty the parsing starts beging of the section. If end tag is empty the parsing goes end of section. This method will parse next subsection after the earlier subsection if aSeeked parameter is not given. If configuration file includes several subsections with both start and end tags so aSeeked parameter seeks the required subsection. The aSeeked parameters indicates subsection that will be parsed.
ParseStartAndEndPos(TPtrC, const TDesC &, TTagToReturnValue, TInt &, TInt &, TInt &)
TInt
|
ParseStartAndEndPos
|
(
|
TPtrC
|
aSection,
|
|
const
TDesC
&
|
aStartTag,
|
|
TTagToReturnValue
|
aTagIndicator,
|
|
TInt
&
|
aStartPos,
|
|
TInt
&
|
aEndPos,
|
|
TInt
&
|
aLength
|
|
)
|
[private]
|
Generic start and end position parser for given data. Returns an error code.
Parameters
TPtrC
aSection
|
|
const
TDesC
& aStartTag
|
|
TTagToReturnValue
aTagIndicator
|
|
TInt
& aStartPos
|
|
TInt
& aEndPos
|
|
TInt
& aLength
|
|
SetData(TPtr, TInt, TInt)
SetPosition(TInt)
Set position. Returns a Symbian OS error code. aPos indicates the position to which section parser should go. SetPosition can be used to set parsing position, e.g. to rewind back to some old position retrieved with GetPosition.
SubSectionL(const TDesC &, const TDesC &, TInt)
Parses a sub sections from the main section with a start and with a end tag. Returns a
CStifSectionParser
object. If start tag is empty the parsing starts beging of the section. If end tag is empty the parsing goes end of section. This method will parse next subsection after the earlier subsection if aSeeked parameter is not given. If configuration file includes several subsections with both start and end tags so aSeeked parameter seeks the required subsection. The aSeeked parameters indicates subsection that will be parsed.
SubstractLine(const TPtrC &)
TPtrC
|
SubstractLine
|
(
|
const
TPtrC
&
|
aText
|
)
|
[private]
|
Substracts line from the begining of selected text.
Member Data Documentation
HBufC * iHBufferSection
HBufC
*
|
iHBufferSection
|
[private]
|
Section length definitions.
TBool
iLineIndicator
TBool
|
iLineIndicator
|
[private]
|
TInt
iSkipAndMarkPos
TInt
|
iSkipAndMarkPos
|
[private]
|
Indicates position where start the parsing.
TInt
iSubOffset
TInt
|
iSubOffset
|
[private]
|
Indicates position where we are currently(subsection).
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.