Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: DelimitedParser8.h
Link against: inetprotutil.lib

Class CDelimitedDataBase8

class CDelimitedDataBase8 : public CBase;

Description

Dependencies : CBase, TDelimitedParserBase8 Comments : Provides functionality for creating and editing a delimited data object. Uses 8-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

If the delimiting character has not been set, then calling any of the functionality will cause a panic KDelimitedParserErrNoDelimiter.

Derivation

Members

Defined in CDelimitedDataBase8:
AddBackDelimiterL(), AddFrontDelimiterL(), CDelimitedDataBase8(), ConstructL(), InsertCurrentL(), Parse(), ParseReverse(), Parser(), PopBackL(), PopFrontL(), PushBackL(), PushFrontL(), RemoveCurrentL(), SetDelimiter(), TrimBackDelimiterL(), TrimFrontDelimiterL(), ~CDelimitedDataBase8()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CDelimitedDataBase8()

IMPORT_C ~CDelimitedDataBase8();

Description

Destructor.


CDelimitedDataBase8()

protected: IMPORT_C CDelimitedDataBase8();

Description

Constructor. First phase of two-phase construction method. Does non-allocating construction.


ConstructL()

protected: IMPORT_C void ConstructL(const TDesC8 &aData);

Pre-Condition

First phase of construction is complete.

Description

Second phase of two-phase construction method. Does any allocations required to fully construct the object.

Post-Condition

The object is fully constructed.

Parameters

const TDesC8 &aData

A descriptor with the initial string.

[Top]


Member functions


InsertCurrentL()

IMPORT_C void InsertCurrentL(const TDesC8 &aSegment);

Pre-Condition

The data must have been initially parsed by Parse() or ParseReverse().

Description

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.

Post-Condition

The data will have been extended to include the new segment. The current segment will remain as the one before the insertion.

Parameters

const TDesC8 &aSegment

A descriptor with the new segment to be inserted.


RemoveCurrentL()

IMPORT_C void RemoveCurrentL();

Pre-Condition

The data must have been initially parsed by Parse() or ParseReverse().

Description

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.

Post-Condition

The data will have been reduced to exclude the removed segment. The current segment will be set to what was the next segment. If the removed segment was the last segment, the parser is at the end of the data.


PushBackL()

IMPORT_C void PushBackL(const TDesC8 &aSegment);

Pre-Condition

The delimiter must have been set.

Description

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.

Post-Condition

The data will have been extended to include the new segment.

Parameters

const TDesC8 &aSegment

A descriptor with the new segment to be inserted.


PopBackL()

IMPORT_C void PopBackL();

Pre-Condition

The delimiter must have been set.

Description

Removes the last segment from the data. The data must be re-parsed to ensure that the parser is valid.

Post-Condition

The data will have been reduced to exclude the last segment.


PushFrontL()

IMPORT_C void PushFrontL(const TDesC8 &aSegment);

Pre-Condition

The delimiter must have been set.

Description

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.

Post-Condition

The data will have been extended to include the new segment.

Parameters

const TDesC8 &aSegment

A descriptor with the new segment to be inserted.


PopFrontL()

IMPORT_C void PopFrontL();

Pre-Condition

The delimiter must have been set.

Description

Removes the first segment from the data. The data must be re-parsed to ensure that the parser is valid.

Post-Condition

The data will have been reduced to exclude the last segment.


TrimFrontDelimiterL()

IMPORT_C void TrimFrontDelimiterL();

Pre-Condition

The delimiter must have been set.

Description

Removes the front delimiter (if exists) from the data.

Post-Condition

The data might have been reduced to exclude the front delimiter.


AddFrontDelimiterL()

IMPORT_C void AddFrontDelimiterL();

Pre-Condition

The delimiter must have been set.

Description

Adds a delimiter to the front of the data (if it doesn't exist).

Post-Condition

The data might have been extended to include a front delimiter.


TrimBackDelimiterL()

IMPORT_C void TrimBackDelimiterL();

Pre-Condition

The delimiter must have been set.

Description

Removes the back delimiter (if exists) from the data.

Post-Condition

The data might have been reduced to exclude the front delimiter.


AddBackDelimiterL()

IMPORT_C void AddBackDelimiterL();

Pre-Condition

The delimiter must have been set.

Description

Adds a delimiter to the back of the data (if it doesn't exist).

Post-Condition

The data might have been extended to include a front delimiter.


Parse()

IMPORT_C void Parse();

Pre-Condition

The delimiter must have been set.

Description

This parses the data into segments from left to right.

Post-Condition

The current segment is the leftmost segment and the direction of parsing is set from left to right (EDelimitedDataFroward).


ParseReverse()

IMPORT_C void ParseReverse();

Pre-Condition

The delimiter must have been set. Will get a KDelimitedParserErrNoDelimiter panic if the delimiter has not been initialized.

Description

This parses the string into segments from right to left.

Post-Condition

The current segment is the leftmost segment and the direction of parsing is right to left.


Parser()

IMPORT_C const TDelimitedParserBase8 &Parser() const;

Description

Retrieves a const reference to the delimited data parser.

Return value

const TDelimitedParserBase8 &

A const reference to the delimited data parser.


SetDelimiter()

protected: IMPORT_C void SetDelimiter(TChar aDelimiter);

Description

Sets the delimiting character.

Post-Condition

The delimiting character is updated.

Parameters

TChar aDelimiter

The delimiting character.