Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: VRECUR.H
Link against: vcal.lib

Class CVersitRecurrenceMonthlyByPos

class CVersitRecurrenceMonthlyByPos : public CVersitRecurrence;

Description

Defines a list of days when a 'monthly by position' recurrence is to be repeated.

Used by a repeating event (a vCalendar event or to-do) to define when it is to occur.

The days on which the event occurs are identified by their relative position within the month, for example the second Monday or the last Friday.

A pointer to this object may be owned by a CParserPropertyValueRecurrence object

Note: The CMonthPosition class, defined within this class, is used to define the positions of days within the month.

Derivation

Members

Defined in CVersitRecurrenceMonthlyByPos:
CMonthPosition, CVersitRecurrenceMonthlyByPos(), ExternalizeOccurrenceListsL(), iMonthPositions, ~CVersitRecurrenceMonthlyByPos()

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

Inherited from CVersitRecurrence:
EDaily, EMonthlyByDay, EMonthlyByPos, EWeekly, EYearlyByDay, EYearlyByMonth, TType, iDuration, iEndDate, iInterval, iRepeatType


Construction and destruction


CVersitRecurrenceMonthlyByPos()

IMPORT_C CVersitRecurrenceMonthlyByPos(TInt aInterval, TInt aDuration, TVersitDateTime *aEndDate, CArrayPtrFlat< CMonthPosition > *aMonthPositions);

Description

Constructs the CVersitRecurrenceMonthlyByPos object.

Sets the interval, the duration, optionally, an end date for the repeat and a pointer to an array of 'month positions', which specify when the event occurs. Also sets the repeat type to EMonthlyByPos.

If a duration and an end date are both specified, the end date takes precedence.

Parameters

TInt aInterval

The number of months between repeats.

TInt aDuration

The duration, in months, for which the event should recur. A value of zero indicates the repeat should continue forever.

TVersitDateTime *aEndDate

Pointer to the end date for the repeat event. The object takes ownership of this pointer.

CArrayPtrFlat< CMonthPosition > *aMonthPositions

Pointer to an array of the positions of days within the month. The object takes ownership of this pointer.


~CVersitRecurrenceMonthlyByPos()

IMPORT_C ~CVersitRecurrenceMonthlyByPos();

Description

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

[Top]


Member functions


ExternalizeOccurrenceListsL()

virtual IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream &aStream) const;

Description

Writes the days of the month on which the event occurs to the output stream, aStream.

If an event occurs on Monday and Tuesday of the first week and the second to last week of a month, the string written to aStream would be "1+ MO TU 2- MO TU ", with the plus sign indicating that the week is counted from the start of the month and the minus sign indicating that the week is counted from the end of the month.

Parameters

RWriteStream &aStream

The stream to which the occurrence list is to be written.

[Top]


Member classes


Class CMonthPosition

class CMonthPosition : public CBase;

Description

Defines a week within the month, using the numeric occurrence of the week (between 1 and 5 inclusive) counting from either the start or end of the month, and defines an array of days within this week.

Derivation

Members

Defined in CVersitRecurrenceMonthlyByPos::CMonthPosition:
EWeeksFromEndOfMonth, EWeeksFromStartOfMonth, TSign, iArrayOfWeekDays, iSign, iWeekNo, ~CMonthPosition()

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

Construction and destruction


~CMonthPosition()

IMPORT_C ~CMonthPosition();

Description

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

Member enumerations


Enum TSign

TSign

Description

Flags that define whether the week number is counted from the start or end of the month.

EWeeksFromStartOfMonth

Indicates that the iWeekNo member specifies a number counting forwards from the start of the month.

EWeeksFromEndOfMonth

Indicates that the iWeekNo member specifies a number counting backwards from the end of the month.

Member data


iSign

TSign iSign;

Description

Indicates whether the week number iWeekNo is counted from the start or the end of the month. A plus sign denotes from the start of the month and a minus sign denotes from the end.


iWeekNo

TInt iWeekNo;

Description

A week number within the month, between 1 and 5 inclusive.


iArrayOfWeekDays

CWeekDayArray * iArrayOfWeekDays;

Description

Pointer to an array of week days.

[Top]


Member data


iMonthPositions

CArrayPtrFlat< CMonthPosition > * iMonthPositions;

Description

Array of 'month positions' which define the days on which the event occurs.