![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
CArrayFixBase |
Abstract: implementation; non-templated base class and shared code. |
CArrayFix<TAny> |
Abstract: implementation; shared code base class. |
CArrayFixFlat<TContactTextDefItem> |
A fixed length array of class TContactTextDefItem objects using a flat array buffer. |
cntdb.h
cntmodel.lib
A text definition is an array of text definition items (TContactTextDefItems). It is used to define a way of grouping together fields to specify a string to represent a contact item.
When creating the string, a contact item is searched for fields whose type match those specified in the text definition. The contents of the first matching field of each type found in the item are read into the string. These may be separated using field separators which are also specified in the text definition. A separator is not appended to the last field used to make up the string it is only inserted when there is a following non-empty field.
In addition to the array of text definition items, a fallback field type can be specified. This is used when none of the fields specified in the text definition item array contain any text. If the fallback field contains no text either, or if no fallback field type has been specified (its value is KUidContactFieldNone), the text is read from the first non-empty field.
A contact database can have a default text definition which is set using CContactDatabase::SetTextDefinitionL(). This may be overriden using the variants of CContactDatabase::ReadContactTextDefL() which take a CContactTextDef* argument.
CContactTextDef is derived from CArrayFixFlat<TContactTextDefItem>, so all relevant functions can be used, e.g. to add and remove elements.
static CContactTextDef* NewL();
static CContactTextDef* NewLC();
Use these functions to allocate and construct a new CContactTextDef. If the new text definition is successfully constructed, NewLC() leaves it on the cleanup stack.
The fallback field type is initialised to KUidContactFieldNone.
CContactTextDef* |
Pointer to the newly created text definition. |
void SetFallbackField(TFieldType iFieldType);
Set the fallback field type.
TFieldType iFieldType |
The fallback field type. |
TFieldType FallbackField() const;
Get the fallback field type.
TFieldType |
The fallback field type. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |