Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: VPROP.H
Link against: versit.lib

Class CParserPropertyValueDateTime

class CParserPropertyValueDateTime : public CParserTimePropertyValue;

Description

A date/time property value parser.

The date/time value is contained in a TVersitDateTime object.

The UID for a date/time property value is KVersitPropertyDateTimeUid.

Derivation

Members

Defined in CParserPropertyValueDateTime:
CParserPropertyValueDateTime(), ConvertAllDateTimesToUTCL(), ConvertAllUTCDateTimesToMachineLocalL(), ExternalizeL(), Value(), iValue, ~CParserPropertyValueDateTime()

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

Inherited from CParserPropertyValue:
Append(), EncodeL(), FoldAndWriteValueToStreamL(), FoldEncodeAndWriteValueToStreamL(), IsAsciiCharacterSetSufficient(), PlugIn(), SetPlugIn(), Uid()

Inherited from CParserTimePropertyValue:
ConvertDateTime(), EncodeTimePeriodL(), EncodeVersitDateTimeL(), SupportsInterface()


Construction and destruction


CParserPropertyValueDateTime()

IMPORT_C CParserPropertyValueDateTime(TVersitDateTime *aValue);

Description

Constructs a CParserPropertyValueDateTime with a TVersitDateTime value.

Sets the property value's UID to KVersitPropertyDateTimeUid.

Parameters

TVersitDateTime *aValue

Pointer to the date/time specification, which includes information about the date/time. The property value takes ownership of the pointer.


~CParserPropertyValueDateTime()

IMPORT_C ~CParserPropertyValueDateTime();

Description

Frees all resources owned by the property value, prior to its destruction.

[Top]


Member functions


Value()

inline TVersitDateTime *Value() const;

Description

Gets a pointer to the date/time property value.

Return value

TVersitDateTime *

Pointer to the date/time property value.


ConvertAllDateTimesToUTCL()

virtual IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds &aIncrement, const CVersitDaylight *aDaylight);

Description

Converts the object's date/time value into universal time.

The date/time is checked against the daylight saving information provided in aDaylight. If it falls inside the daylight saving period then the daylight saving offset is subtracted from the time to convert it to universal time. Otherwise aIncrement is added to the date/time to convert it to universal time.

Note that the daylight savings offset will adjust the time both for the daylight saving and for the time zone.

The function has no effect if the value is already stored as universal time.

If aDaylight is a NULL pointer then aIncrement is used.

Parameters

const TTimeIntervalSeconds &aIncrement

A time interval in seconds which represents the negative of the time zone of the originating machine.For instance, if the time zone is +04:30 (that is 4hr 30mins ahead of UTC), aIncrement should be set to minus the number of seconds in 4hr 30mins.

const CVersitDaylight *aDaylight

Pointer to the specification for daylight saving. If the date/time value is within the period for daylight saving, the value is modified by the daylight saving offset (which accounts for both the time zone and daylight saving rule).


ConvertAllUTCDateTimesToMachineLocalL()

virtual IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds &aIncrement);

Description

Converts the date/time property value into machine-local time.

This process involves adjusting the date/time value by the offset in aIncrement.

The function has no effect if the value is already stored as machine-local time.

Parameters

const TTimeIntervalSeconds &aIncrement

A time interval which represents the number of seconds which is to be added to the date/time value. This should normally be the universal time offset for the machine's locale.


ExternalizeL()

virtual IMPORT_C void ExternalizeL(RWriteStream &aStream, const Versit::TEncodingAndCharset &,TInt);

Description

Externalises the date/time property value to aStream.

Parameters

RWriteStream &aStream

Stream to which the value should be externalised

const Versit::TEncodingAndCharset &

TInt

[Top]


Member data


iValue

protected: TVersitDateTime * iValue;

Description