Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: agmentry.h
Link against: agnmodel.lib

Class CAgnAnniv

CAgnAnniv

Support

Supported from 5.0

Description

An anniversary entry or instance. An anniversary is an event which occurs once a year. It may be repeating, and if so, the repeat type must be yearly. CAgnAnniv is derived from CAgnEvent — its additional details include an optional base year, so that an anniversary can be displayed showing the number of years since the base year (e.g. how old someone is on this birthday) and/or showing the base year itself.

Derivation

CAgnAnnivAn anniversary entry or instance
CAgnBasicEntryAbstract base class for the entry classes CAgnAppt, CAgnTodo, CAgnEvent and CAgnAnniv
CAgnEntryAbstract base class for the concrete agenda entry classes
CAgnEventAn event entry or instance
CBaseBase class for all classes to be instantiated on the heap

Defined in CAgnAnniv:
BaseYear(), CopyFromL(), DisplayAs(), EBaseAndElapsed, EBaseYear, EElapsedYears, ENone, HasBaseYear(), NewL(), NewLC(), SetBaseYear(), SetDisplayAs(), SetHasBaseYear(), TDisplayAs, Type()

Inherited from CAgnBasicEntry:
AddExceptionL(), AlarmDaysWarning(), AlarmInstanceDateTime(), AlarmTime(), ClearAllAttributes(), ClearRepeat(), DisplayInYearView(), EntrySymbol(), Exceptions(), FindException(), HasAlarm(), HasDefaultDisplayTime(), HasEntrySymbol(), HasExceptions(), HasExtended(), IsADayNote(), IsCrossedOut(), IsRepeating(), IsSketch(), IsStoredInline(), IsTentative(), PruneExceptions(), RemoveAllExceptions(), RemoveException(), RptDef(), SetAlarm(), SetDisplayInYearView(), SetEntrySymbol(), SetHasAlarm(), SetHasDefaultDisplayTime(), SetHasEntrySymbol(), SetHasExceptions(), SetHasExtended(), SetIsADayNote(), SetIsCrossedOut(), SetIsRepeating(), SetIsSketch(), SetIsStoredInline(), SetIsTentative(), SetRptEndDate(), SetRptStartDate()

Inherited from CAgnEntry:
AddAttendeeL(), AddCategoryL(), AlarmSoundName(), AttendeeCount(), CastToAnniv(), CastToAppt(), CastToEvent(), CastToTodo(), CategoryCount(), ClearAlarm(), CloseEmbeddedStore(), CompareL(), CreationDate(), DeleteAttendee(), DeleteCategory(), EAnniv, EAppt, EDeepCopy, EEvent, EShallowCopy, ETodo, EmbeddedStore(), EntryId(), ExternalizeL(), FetchAttendee(), FetchCategory(), GetBackgroundColor(), HasAttendees(), HasCategory(), InstanceDate(), InstanceId(), InternalizeL(), LoadAllComponentsL(), Location(), MakeInstanceNonRepeating(), OpenEmbeddedStoreL(), OpenRichTextStoreL(), ReplicationData(), RestoreComponentsL(), RichTextL(), RichTextStreamId(), SetAlarmSoundNameL(), SetBackgroundColorL(), SetCreationDateL(), SetId(), SetIdAndInstanceDate(), SetInstanceDate(), SetInstanceId(), SetLastChangedDate(), SetLocationL(), SetReplicationData(), SetRichTextStreamId(), SetRptDefL(), SetUniqueId(), StoreComponentsL(), TCopyHow, TType, UniqueId()

Inherited from CAgnEvent:
BasicEvent(), DisplayTime(), EndDate(), InstanceEndDate(), InstanceStartDate(), SetDisplayTime(), SetStartAndEndDate(), StartDate()

Inherited from CBase:
operator new()


Construction


NewL()

static CAgnAnniv* NewL(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow);

Description

Allocates memory for and constructs a new anniversary entry. If allocation is successful, it returns a pointer to the new object. A leave occurs if there is insufficient memory available.

The anniversary start and end dates and the instance date are all initialised to null, the anniversary’s has default display time property is set and the display time is set to zero.

Parameters

const CParaFormatLayer* aParaFormatLayer

Pointer to the format layer on which the entry's rich text paragraph formatting will be based.

const CCharFormatLayer* aCharFormatLayer

Pointer to the format layer on which the entry's rich text character formatting will be based.

TCreateHow aCreateHow

This argument is used internally, for test purposes only. It has a default value and should be ignored by developers.

Return value

CAgnAnniv*

Pointer to the new anniversary entry.


NewLC()

static CAgnAnniv* NewLC(const CParaFormatLayer* aParaFormatLayer,const CCharFormatLayer* aCharFormatLayer,TCreateHow aCreateHow);

Description

Allocates memory for and constructs a new anniversary entry. If allocation is successful, it returns a pointer to the new object which is left on the clean-up stack. A leave occurs if there is insufficient memory available.

The anniversary start and end dates and the instance date are all initialised to null, the anniversary’s has default display time property is set and the display time is set to zero.

Parameters

const CParaFormatLayer* aParaFormatLayer

Pointer to the format layer on which the entry's rich text paragraph formatting will be based.

const CCharFormatLayer* aCharFormatLayer

Pointer to the format layer on which the entry's rich text character formatting will be based.

TCreateHow aCreateHow

This argument is used internally, for test purposes only. It has a default value and should be ignored by developers.

Return value

CAgnAnniv*

Pointer to the new anniversary entry.

[Top]


Base year


BaseYear()

TTimeIntervalYears BaseYear() const;

Description

Returns the anniversary entry’s base year as set by SetBaseYear().

Return value

TTimeIntervalYears

The anniversary entry’s base year.


SetBaseYear()

void SetBaseYear(TTimeIntervalYears aBaseYear);

Description

Sets the base year for an anniversary. If the anniversary is repeating, and if the new base year is before the start of the repeat, the anniversary’s repeat definition is changed so that the start year for the repeat is set to the new base year. An exception to this is if the new base year is before the agenda model's minimum year (1980). In this case, the repeat is set to start from the minimum year. This function also sets the anniversary’s has base year property.

Parameters

TTimeIntervalYears aBaseYear

The base year to be set.


HasBaseYear()

TBool HasBaseYear() const;

Description

Retrieves the anniversary entry’s has base year property. This property indicates whether the anniversary has a base year and does not start at the default year 1980.

Return value

TBool

ETrue if anniversary has a base year, EFalse if not.


SetHasBaseYear()

void SetHasBaseYear(TBool aHasBaseYear);

Description

Sets the anniversary entry’s has base year property. This function is invoked by SetBaseYear().

Parameters

TBool aHasBaseYear

ETrue if anniversary entry has a base year, EFalse if not.

[Top]


Display mode


DisplayAs()

TDisplayAs DisplayAs() const;

Description

Retrieves whether the anniversary should be displayed as the base year alone, the elapsed years alone, both the base year and elapsed years, or none of these.

Return value

TDisplayAs

Indicates how the anniversary should be displayed. (See TDisplayAs enum)


SetDisplayAs()

void SetDisplayAs(TDisplayAs aDisplayAs);

Description

Sets how the anniversary should be displayed.

Parameters

TDisplayAs aDisplayAs

Display mode of anniversary entry.

[Top]


Entry type


Type()

virtual TType Type() const;

Description

Returns the type of entry as an anniversary. Used after retrieving an entry or instance of an unknown type into a CAgnEntry. You then have to cast the entry to its proper type in order to use the functions provided by the concrete class. Functions provided by CAgnEntry can be used without casting the entry.

Return value

TType

The entry type (EAnniv).

[Top]


Copy


CopyFromL()

virtual void CopyFromL(CAgnEntry* aSource,const MPictureFactory* aPictureFactory);

Description

Copy the anniversary entry and general entry details from aSource into this object  — any previous contents are lost.

Parameters

CAgnEntry* aSource

Pointer to an agenda entry object containing details common to all entries and optionally details specific to anniversary or event entries.

const MPictureFactory* aPictureFactory

Pointer to a picture header factory. This argument only needs to be specified if the source entry contains embedded pictures.

[Top]


Enumerations


Enum TDisplayAs

TDisplayAs

Description

Anniversary display modes

ENone

None of the following.

EBaseYear

Display base year.

EElapsedYears

Display years elapsed since base year.

EBaseAndElapsed

Display both base and elapsed years.