CStifParser Class Reference

class CStifParser : public CBase

Inherits from

Constructor & Destructor Documentation

CStifParser(TCommentType)

CStifParser(TCommentTypeaCommentType)[private]

C++ default constructor.

Parameters

TCommentType aCommentType

~CStifParser()

IMPORT_C~CStifParser()

Destructor.

Member Functions Documentation

ConstructL(const TDesC &, const TDesC &, const TDesC &)

voidConstructL(const TDesC &aPath,
const TDesC &aConfig,
const TDesC &aContent =  KNullDesC
)[private]

By default Symbian OS constructor is private.

Parameters

const TDesC & aPath
const TDesC & aConfig
const TDesC & aContent =  KNullDesC

HandleSpecialMarks(TPtr &)

voidHandleSpecialMarks(TPtr &aBuf)[private]

Parameters

TPtr & aBuf

NewL(const TDesC &, const TDesC &, TCommentType)

IMPORT_C CStifParser *NewL(const TDesC &aPath,
const TDesC &aConfig,
TCommentType = ENoComments
)[static]

Two-phased constructor. Creating parser with path and file information. For default all information will be parsed(ENoComments).

Parameters

const TDesC & aPath
const TDesC & aConfig
TCommentType  = ENoComments

NewL(const TDesC &, TCommentType)

IMPORT_C CStifParser *NewL(const TDesC &aBuffer,
TCommentType = ENoComments
)[static]

Two-phased constructor. Creating parser with buffer information. For default all information will be parsed(ENoComments).

Parameters

const TDesC & aBuffer
TCommentType  = ENoComments

NextSectionFileL(const TDesC &, const TDesC &, TInt)

CStifSectionParser *NextSectionFileL(const TDesC &aStartTag,
const TDesC &aEndTag,
TIntaSeeked
)[private]

Open and read configuration source and parses a required section. If start tag is empty the parsing starts beging of the configuration file. If end tag is empty the parsing goes end of configuration file. This method will parse next section after the earlier section if aSeeked parameter is not given. If configuration file includes several sections with both start and end tags so aSeeked parameter seeks the required section. The aSeeked parameters indicates section that will be parsed.

Parameters

const TDesC & aStartTag
const TDesC & aEndTag
TInt aSeeked

NextSectionL(const TDesC &, const TDesC &, TInt)

IMPORT_C CStifSectionParser *NextSectionL(const TDesC &aStartTag,
const TDesC &aEndTag,
TIntaSeeked = 1
)

Open and read configuration source and parses a required section. If start tag is empty the parsing starts beging of the configuration file. If end tag is empty the parsing goes end of configuration file. This method will parse next section after the earlier section if aSeeked parameter is not given. If configuration file includes several sections with both start and end tags so aSeeked parameter seeks the required section. The aSeeked parameters indicates section that will be parsed.

Parameters

const TDesC & aStartTag
const TDesC & aEndTag
TInt aSeeked = 1

NextSectionMemoryL(const TDesC &, const TDesC &, TInt)

CStifSectionParser *NextSectionMemoryL(const TDesC &aStartTag,
const TDesC &aEndTag,
TIntaSeeked
)[private]

Open and read configuration source and parses a required section. If start tag is empty the parsing starts beging of the configuration file. If end tag is empty the parsing goes end of configuration file. This method will parse next section after the earlier section if aSeeked parameter is not given. If configuration file includes several sections with both start and end tags so aSeeked parameter seeks the required section. The aSeeked parameters indicates section that will be parsed.

Parameters

const TDesC & aStartTag
const TDesC & aEndTag
TInt aSeeked

ParseCommentsOff(TPtr &)

voidParseCommentsOff(TPtr &aBuf)[private]

Convert a section without comments.

Parameters

TPtr & aBuf

SectionL(const TDesC &, const TDesC &, TInt)

IMPORT_C CStifSectionParser *SectionL(const TDesC &aStartTag,
const TDesC &aEndTag,
TIntaSeeked = 1
)

Open and read configuration source and parses a required section. If start tag is empty the parsing starts beging of the configuration file. If end tag is empty the parsing goes end of configuration file. This method starts always from beginning of configuration file and parses first section if aSeeked parameters is not given. If configuration file includes several sections with both start and end tags so aSeeked parameter seeks the required section. The aSeeked parameters indicates section that will be parsed.

Parameters

const TDesC & aStartTag
const TDesC & aEndTag
TInt aSeeked = 1

Member Enumerations Documentation

Enum TCommentType

Enumerators

ENoComments
ECStyleComments

Enum TParsingMode

Enumerators

EFileParsing
EBufferParsing

Member Data Documentation

TPtr iBuffer

TPtr iBuffer[private]

HBufC * iBufferTmp

HBufC *iBufferTmp[private]

For buffer parsing.

TCommentType iCommentType

TCommentType iCommentType[private]

Comment type's indication.

RFile iFile

RFile iFile[private]

For file opening.

CStifFileParser * iFileParser

CStifFileParser *iFileParser[private]

Pointer to file parser.

RFs iFileServer

RFs iFileServer[private]

For file opening.

TBool iIsUnicode

TBool iIsUnicode[private]

Flag indicating if file is unicode.

TInt iOffset

TInt iOffset[private]

Indicates position where we are currently.

TParsingMode iParsingMode

TParsingMode iParsingMode[private]

Indication which mode of parsing are in use.