EPOC   SDK Home Glossary Indexes Previous Next Up

CParserPropertyValueMultiDateTime class


Contents


CParserPropertyValueMultiDateTime class — Multiple date/time property values

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

CBase

Abstract: CBase behaviour.

CParserPropertyValue

Abstract: Base class for all property values.

CParserTimePropertyValue

Abstract: Base class for all date and time property values.

Defined in

vprop.h

Link against

versit.lib

Description

This class is similar to the CParserPropertyValueDateTime class, which represents a single date/time property value, except that the CParserPropertyValueMultiDateTime class owns an array of date/time property values, which can be externalised and converted between local time and universal time.

To find out the property value type, use Uid() defined in the base class CParserPropertyValue. A multiple date/time property UID has the value KVersitPropertyMultiDateTimeUid.

The class defines an ExternalizeL() function which has not been documented. It is invoked by the parser's ExternalizeL() function.


Construction and destruction


CParserPropertyValueMultiDateTime() — C++ constructor with array of TVersitDateTime values

CParserPropertyValueMultiDateTime(CArrayPtr<TVersitDateTime>* aValue);

Description

Constructs a CParserPropertyValueMultiDateTime with an array of TVersitDateTime values.

Arguments

CArrayPtr<TVersitDateTime>* aValue

Pointer to an array of TVersitDateTime values, each of which specifies a date/time value, and information about that value, for instance whether the date/time is specified in universal time, or in the machine's local time.

The CParserPropertyValueMultiDateTime object takes ownership of the array.


~CParserPropertyValueMultiDateTime() — Destructor

~CParserPropertyValueMultiDateTime();

Description

The destructor frees all resources owned by the property, prior to its destruction.


Time conversion


ConvertAllDateTimesToUTCL() — Convert all date/times to universal time

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

Description

If any of the date/time values owned by the CParserPropertyValueMultiDateTime object is not stored as universal time, this function converts the value into universal time. The function first adds the number of seconds specified in aIncrement, then, the resulting date/time value is modified by the daylight saving offset specified in aDaylight, if applicable.

Arguments

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, aIncrement should be set to –04:30.

const CVersitDaylight* aDaylight

Pointer to the specification for daylight saving. If any date/time value is within the period for daylight saving, the date/time is modified by the daylight saving offset.


ConvertAllUTCDateTimesToMachineLocalL() — Convert all date/times to local time

void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement);

Description

If any of the date/time values owned by the CParserPropertyValueMultiDateTime object is stored as universal time, this function converts it into the local time for the target machine.

It does this by adding the value specified in aIncrement to the date/time value.

Arguments

const TTimeIntervalSeconds& aIncrement

A time interval in seconds to add to a date/time value.

This should normally be the universal time offset for the machine's locale.


Property value


Value() — Get the date/time values

CArrayPtr<TVersitDateTime>* Value() const;

Description

Returns a pointer to the array of date/time values owned by the CParserPropertyValueMultiDateTime object.

Return value

CArrayPtr<TVersitDateTime>*

Pointer to the array of date/time values.

EPOC       SDK Home Glossary Indexes Previous Next Up