Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: cntdb.h
Link against: cntmodel.lib

Class CContactViewDef

CContactViewDef

Support

Supported from 5.0

Description

The view definition specifies a subset of fields to be loaded when reading a contact item. A default view definition is owned by the contact database. It is set using CContactDatabase::SetViewDefinitionL() and is used in calls to CContactDatabase::ReadContactL(), ReadContactLC() and ReadContactAndAgentL() when no view definition is specified.

The view definition owns the item view definition (see the CContactItemViewDef class), which stores the view definition's field types, use and mode.

The following functions prototyped in class CContactViewDef have not been implemented: — Groups(), AddL().

Derivation

CBaseBase class for all classes to be instantiated on the heap
CContactViewDefThe view definition specifies a subset of fields to be loaded when reading a contact item

Defined in CContactViewDef:
ExternalizeL(), InternalizeL(), ItemDef(), NewL(), NewLC(), ~CContactViewDef()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CContactViewDef* NewL();
static CContactViewDef* NewL(CContactItemViewDef* aItemDef);

Description

Allocates and constructs a view definition — overloaded function. An item view definition may be specified to contain the view definition's field types, use and mode.

Parameters

CContactItemViewDef* aItemDef

Pointer to the item view definition. The view definition takes ownership of the object.

Return value

CContactViewDef*

Pointer to the new view definition.


NewLC()

static CContactViewDef* NewLC();
static CContactViewDef* NewLC(CContactItemViewDef* aItemDef);

Description

Allocates and constructs a view definition — overloaded function. An item view definition may be specified to contain the view definition's field types, use and mode.

Parameters

CContactItemViewDef* aItemDef

Pointer to the item view definition. The view definition takes ownership of the object.

Return value

CContactViewDef*

Pointer to the new view definition. This pointer is left on the cleanup stack.


~CContactViewDef()

~CContactViewDef();

Description

Deletes the view definition object and all resources owned by it.

[Top]


Stream persistence


InternalizeL()

void InternalizeL(RReadStream& aStream);

Description

Internalises the object's item view definition from a read stream. The presence of this function means that the standard templated operator>>() (defined in s32strm.h) 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 the object's item view definition to a write stream. The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.

Parameters

RWriteStream& aStream

Stream to which the object should be externalised.

[Top]


Item view definition


ItemDef()

CContactItemViewDef& ItemDef() const;

Description

Retrieves the object's item view definition.

Return value

CContactItemViewDef&

Reference to the item view definition.