Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: cntitem.h
Link against: cntmodel.lib

Class CContactTemplate

CContactTemplate

Support

Supported from 5.0

Description

A template is a contact item which is used to seed the initial field set for other contact items.

In EPOC Release 5, only a single contact item template was supported — the system template. Its ID is returned by CContactDatabase::TemplateId(). After EPOC Release 5, support for multiple non-system (i.e. user-defined) templates was added. They are implemented by the CContactCardTemplate class. After EPOC Release 5, CContactCardTemplate should be used in preference to CContactTemplate.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CContactItemThe abstract base class for contact cards, templates and groups
CContactTemplateA template is a contact item which is used to seed the initial field set for other contact items

Defined in CContactTemplate:
NewL(), NewLC(), Type()

Inherited from CBase:
operator new()

Inherited from CContactItem:
AccessCount(), AddFieldL(), CardFields(), DecAccessCount(), Id(), IncAccessCount(), InsertFieldL(), IsDeletable(), IsDeleted(), IsHidden(), IsSystem(), LastModified(), RemoveField(), SetDeleteFlag(), SetDeleted(), SetHidden(), SetLastModified(), SetSystem(), SetTemplateRefId(), SetUidStringL(), TemplateRefId(), UidStringL(), UpdateFieldSet()


Allocation and construction


NewL()

static CContactTemplate* NewL();
static CContactTemplate* NewL(const CContactItem *aTemplate);

Description

Allocates and constructs a new system template — overloaded function. The template may optionally be seeded from another template. The second overload takes a copy of aTemplate — it does not take ownership of it.

Parameters

const CContactItem *aTemplate

The contact template to use as the seed.

Return value

CContactTemplate*

Pointer to the newly created system template.


NewLC()

static CContactTemplate* NewLC();
static CContactTemplate* NewLC(const CContactItem *aTemplate);

Description

Allocates and constructs a new system template — overloaded function. The template may optionally be seeded from another template. The second overload takes a copy of aTemplate — it does not take ownership of it.

If the new system template is successfully constructed, it is left on the cleanup stack.

Parameters

const CContactItem *aTemplate

The contact template to use as the seed.

Return value

CContactTemplate*

Pointer to the newly created system template.


Type()

TUid Type() const;

Description

Implements the pure virtual function inherited from the base class CContactItem. Returns KUidContactTemplate.

Return value

TUid

KUidContactTemplate.