CParserGroupedProperty Class Reference

#include <app/vcard.h>

Link against: vcard.lib

class CParserGroupedProperty : public CParserProperty

Inherits from

Protected Attributes
CDesC8Array *iArrayOfGroups
Public Member Functions
CParserGroupedProperty(CDesC8Array *, CArrayPtr< CParserParam > *)
~CParserGroupedProperty()
virtual IMPORT_C voidExternalizeL(RWriteStream &, CVersitParser *)
IMPORT_C TBoolGroup(const TDesC8 &)
const CDesC8Array *Groups()
IMPORT_C CParserGroupedProperty *NewL(CParserPropertyValue &, const TDesC8 &, CDesC8Array *, CArrayPtr< CParserParam > *)
voidSetGroups(CDesC8Array *)
virtual IMPORT_C TBoolSupportsInterface(const TUid &)
Protected Member Functions
CParserGroupedProperty(CParserPropertyValue &, CDesC8Array *, CArrayPtr< CParserParam > *)
Inherited Attributes
CParserProperty::iArrayOfParams
CParserProperty::iPropertyName
CParserProperty::iPropertyNameUid
CParserProperty::iPropertyValue
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CParserProperty::AddParamL(CParserParam *)
CParserProperty::CParserProperty(CArrayPtr< CParserParam > *)
CParserProperty::CParserProperty(CParserPropertyValue &,CArrayPtr< CParserParam > *)
CParserProperty::ConstructSelfL(CParserProperty &,const TDesC8 &)
CParserProperty::DeleteParam(TDesC8 &)
CParserProperty::LoadBinaryValuesFromFilesL(RFs &)
CParserProperty::Name()const
CParserProperty::NameUid()const
CParserProperty::NewL(CParserPropertyValue &,const TDesC8 &,CArrayPtr< CParserParam > *)
CParserProperty::Param(const TDesC8 &)const
CParserProperty::ParamArray()const
CParserProperty::SaveBinaryValuesToFilesL(TInt,const TDesC &,RFs &)
CParserProperty::SetNameL(const TDesC8 &)
CParserProperty::SetNameUid(TUid)
CParserProperty::SetParamArray(CArrayPtr< CParserParam > *)
CParserProperty::SetValue(CParserPropertyValue *)
CParserProperty::Uid()const
CParserProperty::Value()const
CParserProperty::~CParserProperty()

Detailed 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.

Member Attribute Documentation

iArrayOfGroups

CDesC8Array *iArrayOfGroups[protected]

Constructor & Destructor Documentation

CParserGroupedProperty ( CDesC8Array *, CArrayPtr< CParserParam > * )

IMPORT_CCParserGroupedProperty(CDesC8Array *aArrayOfGroups,
CArrayPtr< CParserParam > *aArrayOfParams
)

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

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

CParserGroupedProperty ( CParserPropertyValue &, CDesC8Array *, CArrayPtr< CParserParam > * )

CParserGroupedProperty(CParserPropertyValue &aPropertyValue,
CDesC8Array *aArrayOfGroups,
CArrayPtr< CParserParam > *aArrayOfParams
)[protected]

~CParserGroupedProperty ( )

IMPORT_C~CParserGroupedProperty()

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

Member Function Documentation

ExternalizeL ( RWriteStream &, CVersitParser * )

IMPORT_C voidExternalizeL(RWriteStream &aStream,
CVersitParser *aVersitParser = NULL
)[virtual]

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.

ParameterDescription
aStreamStream to which the value should be externalised.
aVersitParserVersit parser which contains the objects to be externalised. This must not be NULL or a panic occurs.

Group ( const TDesC8 & )

IMPORT_C TBoolGroup(const TDesC8 &aGroup)const

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

ParameterDescription
aGroupThe name of the property group.

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

Groups ( )

const CDesC8Array *Groups()[inline]

Gets the groups to which the property belongs.

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

NewL ( CParserPropertyValue &, const TDesC8 &, CDesC8Array *, CArrayPtr< CParserParam > * )

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

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.

ParameterDescription
aPropertyValueThe property value. The grouped property takes ownership of this.
aNameThe property name. The grouped property takes ownership of this.
aArrayOfGroupsPointer to an array of descriptors. Each one specifies a group name. The grouped property takes ownership of this array. (May be NULL).
aArrayOfParamsThe property parameters. The grouped property takes ownership of this array. (May be NULL).

Returns: Pointer to the newly created grouped property.

SetGroups ( CDesC8Array * )

voidSetGroups(CDesC8Array *aArrayOfGroups)[inline]

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

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

SupportsInterface ( const TUid & )

IMPORT_C TBoolSupportsInterface(const TUid &aInterfaceUid)const [virtual]

Tests whether the property supports the given interface.

Returns true if the given interface UID is KVersitGroupedPropertyUid.

ParameterDescription
aInterfaceUidAn interface UID.

Returns: ETrue if aInterfaceUid is KVersitGroupedPropertyUid, and EFalse if not.