Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: agmrptd.h
Link against: agnmodel.lib

Class TAgnWeeklyRpt

TAgnWeeklyRpt

Support

Supported from 5.0

Description

Weekly repeat details. In addition to the common repeat information inherited from TAgnRpt, stores the days in the week on which the repeat occurs (using a set of flags), and the day which is the start of the week. The repeat details are used by the CAgnRptDef class, which also stores a list of any exceptions to the repeat.

Derivation

TAgnRptThis class stores the repeat details common to all agenda model repeat types
TAgnWeeklyRptWeekly repeat details

Defined in TAgnWeeklyRpt:
ClearDays(), ExternalizeL(), FindRptEndDate(), FirstDayOfWeek(), InstanceCount(), InternalizeL(), IsDaySet(), NumDaysSet(), SetDay(), TAgnWeeklyRpt(), UnsetDay(), operator==()

Inherited from TAgnRpt:
ClearAll(), DisplayNextOnly(), EndDate(), EndDateAsAgnDate(), Interval(), RepeatForever(), SetDisplayNextOnly(), SetEndDate(), SetInterval(), SetRepeatForever(), SetStartDate(), StartDate(), StartDateAsAgnDate()


Construction


TAgnWeeklyRpt()

TAgnWeeklyRpt();

Description

The default C++ constructor is used to construct a weekly repeat object. The weekly repeat days are all cleared, and the day which is the start of the week is initialised from the system’s locale settings.


TAgnWeeklyRpt()

TAgnWeeklyRpt(const TAgnRpt& aRpt);

Description

The C++ copy constructor constructs a new TAgnWeeklyRpt object from an existing TAgnRpt-derived object. The weekly repeat days are all cleared, and the day which is the start of the week is initialised from the system’s locale settings.

Parameters

const TAgnRpt& aRpt

The object to be copied.


TAgnWeeklyRpt()

TAgnWeeklyRpt(const TAgnWeeklyRpt& aRpt);

Description

The C++ copy constructor constructs a new TAgnWeeklyRpt object from an existing TAgnWeeklyRpt object.

Parameters

const TAgnWeeklyRpt& aRpt

The object to be copied.

[Top]


Set repeat details


ClearDays()

void ClearDays();

Description

Clears all the weekly repeat days.


SetDay()

void SetDay(TDay aDay);

Description

Adds a day. More than one day can be set at a time.

Parameters

TDay aDay

The day to be added.


UnsetDay()

void UnsetDay(TDay aDay);

Description

Removes a day.

Parameters

TDay aDay

The day to be removed.

[Top]


Get repeat details


FindRptEndDate()

virtual TTime FindRptEndDate(TUint aCount) const;

Description

Calculates the repeat end date given the specified number of instances.

Parameters

TUint aCount

The number of instances.

Return value

TTime

The repeat end date or a null date if the end date would be past the end of the range of the agenda.


FirstDayOfWeek()

TDay FirstDayOfWeek() const;

Description

Returns which day is being used as the first day of the week. This is set during construction from the operating system’s locale settings.

Return value

TDay

The first day of the week.


InstanceCount()

virtual TUint InstanceCount() const;

Description

Returns the number of instances of the repeat.

Return value

TUint

The number of instances.


IsDaySet()

TBool IsDaySet(TDay aDay) const;

Description

Returns whether a day has been set.

Parameters

TDay aDay

The day to test.

Return value

TBool

True if the day is set, otherwise False.


NumDaysSet()

TUint NumDaysSet() const;

Description

Returns the number of repeat days in the week which are set.

Return value

TUint

The number of days.

[Top]


Comparison


operator==()

TBool operator==(const TAgnWeeklyRpt& aRpt) const;

Description

Compares two weekly repeat objects for equality.

Parameters

const TAgnWeeklyRpt& aRpt

The instance to be compared.

Return value

TBool

True if all repeat details are equal, otherwise False.

[Top]


Stream persistence


ExternalizeL()

virtual void ExternalizeL(RWriteStream& aStream) const;

Description

Externalises the weekly repeat object to a write stream.

Parameters

RWriteStream& aStream

Stream to which the object should be externalised.


InternalizeL()

virtual void InternalizeL(RReadStream& aStream);

Description

Internalises the weekly repeat object from a read stream.

Parameters

RReadStream& aStream

Stream from which the object should be internalised.