Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: VPROP.H
Link against: versit.lib

Class CParserPropertyValue

class CParserPropertyValue : public CBase;

Description

Abstract base class for all property values.

Defines a pure virtual ExternalizeL() function which should write out the property value to a stream.

The type of derived class is returned by the Uid() function; the UID value is specified on construction.

The other functions relate to the character set, encoding format and plug-in used during externalising.

Derivation

Members

Defined in CParserPropertyValue:
Append(), CParserPropertyValue(), EncodeL(), ExternalizeL(), FoldAndWriteValueToStreamL(), FoldEncodeAndWriteValueToStreamL(), FoldEncodeAndWriteValueToStreamL(), IsAsciiCharacterSetSufficient(), PlugIn(), SetPlugIn(), SupportsInterface(), Uid()

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

See also


Construction and destruction


CParserPropertyValue()

protected: IMPORT_C CParserPropertyValue(const TUid &aPropertyValueUid);

Description

Parameters

const TUid &aPropertyValueUid

[Top]


Member functions


ExternalizeL()

virtual void ExternalizeL(RWriteStream &aStream, const Versit::TEncodingAndCharset &aEncodingCharset, TInt aLengthOutput)=0;

Description

Externalises the property value to a write stream.

Implementations of this function are invoked by the parser's ExternalizeL() function.

Parameters

RWriteStream &aStream

Stream to which the property value is externalised.

const Versit::TEncodingAndCharset &aEncodingCharset

The character set and encoding information.

TInt aLengthOutput

The amount of text that has been outputted so far on the line (for the property name), which may need to be taken into account when calculating if and where any line break should occur.


IsAsciiCharacterSetSufficient()

virtual IMPORT_C TBool IsAsciiCharacterSetSufficient();

Description

Tests whether the Ascii character set is sufficient to represent a property value.

This implementation returns ETrue.

It is overridden by classes CParserPropertyValueAlarm, CParserPropertyValueHBufC and CParserPropertyValueCDesCArray.

This function is called by CParserProperty::ExternalizeL().

Return value

TBool

ETrue.


EncodeL()

virtual IMPORT_C void EncodeL(CBufBase *aTarget, const TDesC8 &aSource, const TUid &aEncoding) const;

Description

Encodes the text property value referred to in aSource, if encoding is required.

Uses the encoding format identified by aEncoding. This is only used for text property values (e.g. HBufC or DesCArray property types).

Invoked by implementations of ExternalizeL().

Parameters

CBufBase *aTarget

A pointer to the buffer which will have the converted text written into it.

const TDesC8 &aSource

The source text.

const TUid &aEncoding

An encoding UID. The possible encoding formats are defined in vuid.h. Specify NULL UID if no encoding is required.


SupportsInterface()

virtual IMPORT_C TBool SupportsInterface(const TUid &) const;

Description

Tests whether the property value supports the specified interface.

This implementation returns EFalse.

It is implemented by the derived class CParserTimePropertyValue to return ETrue if aInterfaceUid is KVersitTimePropertyUid.

Parameters

const TUid &

Return value

TBool

EFalse.


Uid()

inline TUid Uid() const;

Description

Returns the property value's UID.

This UID identifies the property value's type and is specified on construction. The values are defined in vuid.h.

Return value

TUid

The property value's UID.


SetPlugIn()

inline void SetPlugIn(MVersitPlugIn *aPlugIn);

Description

Assigns a Versit plug-in to the property value.

Allows functions of the MVersitPlugIn class to be used when writing to a stream.

If a plug-in is in use then this function needs to be called with each property value before it is externalised. However, this will be done for you if you add a property using the function CVersitParser::AddPropertyL().

Parameters

MVersitPlugIn *aPlugIn

A pointer to an MVersitPlugIn instance.


FoldEncodeAndWriteValueToStreamL()

protected: IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream &aStream, const TDesC &aValue,const Versit::TEncodingAndCharset &aEncodingCharset, TInt &aLengthOutput) const;

Description

Parameters

RWriteStream &aStream

const TDesC &aValue

const Versit::TEncodingAndCharset &aEncodingCharset

TInt &aLengthOutput


FoldEncodeAndWriteValueToStreamL()

protected: IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream &aStream, const CDesCArray *aValueArray,const Versit::TEncodingAndCharset &aEncodingCharset, TInt &aLengthOutput) const;

Description

Parameters

RWriteStream &aStream

const CDesCArray *aValueArray

const Versit::TEncodingAndCharset &aEncodingCharset

TInt &aLengthOutput


FoldAndWriteValueToStreamL()

protected: IMPORT_C void FoldAndWriteValueToStreamL(RWriteStream &aStream, const TDesC &aValue,const Versit::TEncodingAndCharset &aEncodingCharset, TInt &aLengthOutput) const;

Description

Parameters

RWriteStream &aStream

const TDesC &aValue

const Versit::TEncodingAndCharset &aEncodingCharset

TInt &aLengthOutput


Append()

protected: static IMPORT_C void Append(TDes16 &aTarget, TDesC8 &aSource);

Description

Parameters

TDes16 &aTarget

TDesC8 &aSource


PlugIn()

protected: inline MVersitPlugIn *PlugIn();

Description

Gets a pointer to the Versit plug-in

Return value

MVersitPlugIn *

A pointer to the plug-in.