Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: VCARD.H
Link against: vcard.lib

Class CParserGroupedProperty

class CParserGroupedProperty : public CParserProperty;

Description

A grouped property.

This is a vCard property which may be a member of one or more property groups. It owns an array of descriptors, each of which identifies a group to which the property belongs.

An example of how grouped properties may be useful is for a person with two homes. Each home has an address and telephone number, both of which are to be stored on the vCard. The address and telephone number are grouped for each home. A prefix for the address and telephone number properties is provided: one for each home. Each prefix is stored as a property group.

When the property is externalised, the identities of all the groups to which the property belongs (i.e. the prefixes) are written to the stream before CParserProperty::ExternalizeL() is called.

The class also provides a function which can be used to test whether the property is a member of a given group.

Note that the vCard parser stores all properties using this class; if the vCard property is not grouped then the array of property groups is empty. Conversely, the vCalender parser does not have property groups, and so stores all properties using the CParserProperty base class.

Derivation

Members

Defined in CParserGroupedProperty:
CParserGroupedProperty(), ExternalizeL(), Group(), Groups(), NewL(), Reserved(), SetGroups(), SupportsInterface(), iArrayOfGroups, ~CParserGroupedProperty()

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

Inherited from CParserProperty:
AddParamL(), ConstructSelfL(), DeleteParam(), LoadBinaryValuesFromFilesL(), Name(), NameUid(), Param(), ParamArray(), SaveBinaryValuesToFilesL(), SetNameL(), SetNameUid(), SetParamArray(), SetValue(), Uid(), Value(), iArrayOfParams, iPropertyName, iPropertyNameUid, iPropertyValue

See also


Construction and destruction


NewL()

static IMPORT_C CParserGroupedProperty *NewL(CParserPropertyValue &aPropertyValue, const TDesC8 &aName, CDesC8Array *aArrayOfGroups, CArrayPtr< CParserParam > *aArrayOfParams);

Description

Allocates and constructs a new grouped property from the value, name, property parameters and groups specified.

Note: the property value, name and array of property parameters are generic to all properties. The array of grouped property names is specific to the CParserGroupedProperty class.

Parameters

CParserPropertyValue &aPropertyValue

The property value. The grouped property takes ownership of this.

const TDesC8 &aName

The property name. The grouped property takes ownership of this.

CDesC8Array *aArrayOfGroups

Pointer to an array of descriptors. Each one specifies a group name. The grouped property takes ownership of this array. (May be NULL).

CArrayPtr< CParserParam > *aArrayOfParams

The property parameters. The grouped property takes ownership of this array. (May be NULL).

Return value

CParserGroupedProperty *

Pointer to the newly created grouped property.


CParserGroupedProperty()

IMPORT_C CParserGroupedProperty(CDesC8Array *aArrayOfGroups, CArrayPtr< CParserParam > *aArrayOfParams);

Description

Allocates and partially constructs a new grouped property using the array of grouped property names and array of property parameters specified.

Parameters

CDesC8Array *aArrayOfGroups

Pointer to an array of descriptors. Each one specifies a group name. The grouped property takes ownership of this array. (May be NULL).

CArrayPtr< CParserParam > *aArrayOfParams

The property parameters. The grouped property takes ownership of this array. (May be NULL).


~CParserGroupedProperty()

IMPORT_C ~CParserGroupedProperty();

Description

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

[Top]


Member functions


Group()

IMPORT_C TBool Group(const TDesC8 &aGroup) const;

Description

Tests whether the property is a member of the specified property group.

Parameters

const TDesC8 &aGroup

The name of the property group.

Return value

TBool

ETrue if the property is a member of the specified property group. EFalse if not.


SetGroups()

inline void SetGroups(CDesC8Array *aArrayOfGroups);

Description

Sets the list of groups to which the property belongs, replacing any existing list.

Parameters

CDesC8Array *aArrayOfGroups

Array of descriptors; each of which specifies a group name. The grouped property takes ownership of the array.


Groups()

inline const CDesC8Array *Groups();

Description

Gets the groups to which the property belongs.

Return value

const CDesC8Array *

Pointer to an array of descriptors. Each one specifies a group name.


SupportsInterface()

virtual IMPORT_C TBool SupportsInterface(const TUid &aInterfaceUid) const;

Description

Tests whether the property supports the given interface.

Returns true if the given interface UID is KVersitGroupedPropertyUid.

Parameters

const TUid &aInterfaceUid

An interface UID.

Return value

TBool

ETrue if aInterfaceUid is KVersitGroupedPropertyUid, and EFalse if not.


ExternalizeL()

virtual IMPORT_C void ExternalizeL(RWriteStream &aStream, CVersitParser *aVersitParser=0);

Description

Externalises the property into aStream.

Externalises the list of groups to which the property belongs, if there are any, then calls CParserProperty::ExternalizeL() to write the rest of the property data to the stream.

Parameters

RWriteStream &aStream

Stream to which the value should be externalised.

CVersitParser *aVersitParser

Versit parser which contains the objects to be externalised. This must not be NULL or a panic occurs.


Reserved()

private: virtual IMPORT_C void Reserved();

Description

[Top]


Member data


iArrayOfGroups

protected: CDesC8Array * iArrayOfGroups;

Description