class CDelimitedDataBase16 : public CBase |
Dependencies : CBase, TDelimitedParserBase16 Comments : Provides functionality for creating and editing a delimited data object. Uses 16-bit descriptors
The object contains a descriptor buffer with the data. Functionality is provided to allow segments to be added or removed from the data. There is access to the internal delimited data parser to provide parsing functionality to be excercised on the created data.
This a base class that cannot be instantiated. It should be derived. The derived class must set the delimited data parser, which is an object derived from TDelimitedParserBase. This helper class must set the delimiting object
Public Member Functions | |
---|---|
~CDelimitedDataBase16() | |
IMPORT_C void | AddBackDelimiterL() |
IMPORT_C void | AddFrontDelimiterL() |
IMPORT_C void | InsertCurrentL(const TDesC16 &) |
IMPORT_C void | Parse() |
IMPORT_C void | ParseReverse() |
IMPORT_C const TDelimitedParserBase16 & | Parser() |
IMPORT_C void | PopBackL() |
IMPORT_C void | PopFrontL() |
IMPORT_C void | PushBackL(const TDesC16 &) |
IMPORT_C void | PushFrontL(const TDesC16 &) |
IMPORT_C void | RemoveCurrentL() |
IMPORT_C void | TrimBackDelimiterL() |
IMPORT_C void | TrimFrontDelimiterL() |
Protected Member Functions | |
---|---|
CDelimitedDataBase16() | |
IMPORT_C void | ConstructL(const TDesC16 &) |
IMPORT_C void | SetDelimiter(TChar) |
Private Member Functions | |
---|---|
void | DoInsertL(const TDesC16 &) |
void | DoRemoveL() |
void | SetData(HBufC16 *) |
void | SetDataL(const TDesC16 &) |
Private Attributes | |
---|---|
HBufC16 * | iDataBuf |
TDelimitedParserBase16 | iParser |
IMPORT_C | CDelimitedDataBase16 | ( | ) | [protected] |
Constructor. First phase of two-phase construction method. Does non-allocating construction.
IMPORT_C void | AddBackDelimiterL | ( | ) |
Adds a delimiter to the back of the data (if it doesn't exist).
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
IMPORT_C void | AddFrontDelimiterL | ( | ) |
Adds a delimiter to the front of the data (if it doesn't exist).
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
IMPORT_C void | ConstructL | ( | const TDesC16 & | aData | ) | [protected] |
Second phase of two-phase construction method. Does any allocations required to fully construct the object.
const TDesC16 & aData | A descriptor with the initial string. |
void | DoInsertL | ( | const TDesC16 & | aSegment | ) | [private] |
Inserts the new segment in a position before the current segment. The new segment can be made up of several segments and have delimiters at either extreme. The insert functionality will ensure that there is always a delimiter at the front of the new segment. The parser will be left in a state where its current segment is the same one as before the insertion.
const TDesC16 & aSegment | The descriptor with the segment to be inserted. |
void | DoRemoveL | ( | ) | [private] |
Removes the current segment. After removing the segment, the parser's new current segment will be the next segment. If the last segment is the one that is removed then the parser will be set to the end of the data.
IMPORT_C void | InsertCurrentL | ( | const TDesC16 & | aSegment | ) |
Inserts the new segment in a position before the current parsed segment. The new segment can be made up of several segments and have delimiters at either extreme. The insert functionality will ensure that there is always a delimiter at the front of the new segment. The parser is left in a state where its current segment is the same one as before the insertion.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set.
const TDesC16 & aSegment | A descriptor with the new segment to be inserted. |
IMPORT_C void | Parse | ( | ) |
This parses the data into segments from left to right.
There will be a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set.
IMPORT_C void | ParseReverse | ( | ) |
This parses the string into segments from right to left.
IMPORT_C const TDelimitedParserBase16 & | Parser | ( | ) | const |
Retrieves a const reference to the delimited data parser.
IMPORT_C void | PopBackL | ( | ) |
Removes the last segment from the data. The data must be re-parsed to ensure that the parser is valid.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
IMPORT_C void | PopFrontL | ( | ) |
Removes the first segment from the data. The data must be re-parsed to ensure that the parser is valid.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
IMPORT_C void | PushBackL | ( | const TDesC16 & | aSegment | ) |
Adds a new segment to the end of the data. The new segment can be made up of several segments and have delimiters at either extreme. The insert functionality will ensure that there is always a delimiter at the front of the new segment. The data must re-parsed to ensure that the parser is valid.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
const TDesC16 & aSegment | A descriptor with the new segment to be inserted. |
IMPORT_C void | PushFrontL | ( | const TDesC16 & | aSegment | ) |
Adds a new segment to the front of the data. The new segment can be made up of several segments and have delimiters at either extreme. The insert functionality will ensure that there is always a delimiter at the front of the new segment. The data must re-parsed to ensure that the parser is valid.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
const TDesC16 & aSegment | A descriptor with the new segment to be inserted. |
IMPORT_C void | RemoveCurrentL | ( | ) |
Removes the current segment. After removing the segment, the parser's new current segment will be the next segment. If the last segment is the one that is removed then the parser will be set to the end of the data.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set.
void | SetData | ( | HBufC16 * | aDataBuf | ) | [private] |
Sets internal data buffer and parser. Cleans up the old data and uses the data buffer. The parser is set to the new data.
HBufC16 * aDataBuf | A pointer to a decriptor buffer with the new data. |
void | SetDataL | ( | const TDesC16 & | aData | ) | [private] |
Updates internal data buffer with the new data. Creates a copy of the new data.
const TDesC16 & aData | A descriptor with the new string. |
IMPORT_C void | SetDelimiter | ( | TChar | aDelimiter | ) | [protected] |
Sets the delimiting character.
TChar aDelimiter | The delimiting character. |
IMPORT_C void | TrimBackDelimiterL | ( | ) |
Removes the back delimiter (if exists) from the data.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
IMPORT_C void | TrimFrontDelimiterL | ( | ) |
Removes the front delimiter (if exists) from the data.
There will be a KDelimitedParserErrNotParsed panic if the data has not been parsed, and a KDelimitedParserErrNoDelimiter panic if the delimiter has not been set. A re-parse is required to ensure that the parser is valid.
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.