Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: agmids.h
Link against: agnmodel.lib

Class TAgnUniqueId

TAgnUniqueId

Support

Supported from 5.0

Description

Uniquely identifies an agenda entry or to-do list in an agenda file using an unsigned integer. This value is assigned when the entry or to-do list is added to the model, and is preserved during updates. Because of this, it can be used to identify the entry or to-do list during synchronisation.

Defined in TAgnUniqueId:
ExternalizeL(), Id(), InternalizeL(), IsNullId(), SetId(), SetNullId(), TAgnUniqueId(), operator!=(), operator<(), operator==(), operator>()


Construction


TAgnUniqueId()

TAgnUniqueId();
TAgnUniqueId(TUint aValue);

Description

Overloaded C++ constructor. The unique ID can be constructed by default — this sets the ID value to zero, or it can be initialised with a TUint.

Parameters

TUint aValue

The value to assign to the ID.

[Top]


Stream persistence


InternalizeL()

void InternalizeL(RReadStream& aStream);

Description

Internalises a unique ID from a read stream. The presence of this function means that the standard templated operator>>() is available to internalise objects of this class.

Parameters

RReadStream& aStream

Stream from which the object should be internalised.


ExternalizeL()

void ExternalizeL(RWriteStream& aStream) const;

Description

Externalises a unique ID to a write stream. The presence of this function means that the standard templated operator<<() is available to externalise objects of this class.

Parameters

RWriteStream& aStream

Stream to which the object should be externalised.

[Top]


Overloaded operators


operator!=()

TBool operator!=(TAgnUniqueId aUId) const;

Description

Compares two unique IDs for inequality.

Parameters

TAgnUniqueId aUId

The unique ID to compare with this one.

Return value

TBool

True if aUId is different from this ID. False if they are the same.


operator==()

TBool operator==(TAgnUniqueId aUId) const;

Description

Compares two unique IDs for equivalence.

Parameters

TAgnUniqueId aUId

The unique ID to compare with this one.

Return value

TBool

True if aUId is equal to this ID. False if they are different.


operator<()

TBool operator<(TAgnUniqueId aUId) const;

Description

Tests whether this unique ID value is less than another.

Parameters

TAgnUniqueId aUId

The unique ID to compare with this one.

Return value

TBool

True if this unique ID value is less than aUId. False if not.


operator>()

TBool operator>(TAgnUniqueId aUId) const;

Description

Tests whether this unique ID value is greater than another.

Parameters

TAgnUniqueId aUId

The unique ID to compare with this one.

Return value

TBool

True if this unique ID value is greater than aUId. False if not.

[Top]


Get/set ID


Id()

TUint Id() const;

Description

Gets the unique ID value.

Return value

TUint

The unique ID value.


SetId()

void SetId(TUint aUId);

Description

Sets the unique ID value.

Parameters

TUint aUId

The new unique ID value.


IsNullId()

TBool IsNullId();

Description

Returns whether the unique ID value has been set.

Return value

TBool

True if the ID value is zero. False if not.


SetNullId()

void SetNullId();

Description

Sets the unique ID value to zero.