Location:
FLDBASE.H
Link against: field.lib
class CTextField : public CBase;
Abstract class: derive from this to instantiate a particular type of field (eg date etc) Abstract base class for all field types.
A field contains information which relates to a text object and can be automatically updated, e.g. page number or current
date and time. Fields must implement the pure virtual functions defined in this class, including Value()
which should calculate and return the field's new value, and Type()
which returns the field's type UID. The type UID identifies the field type to the field factory (see class MTextFieldFactory
).
CBase
- Base class for all classes to be instantiated on the heap
CTextField
- Abstract class: derive from this to instantiate a particular type of field (eg date etc) Abstract base class for all field
types
Defined in CTextField
:
ExternalizeL()
, InternalizeL()
, RestoreL()
, StoreL()
, Type()
, Value()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
virtual IMPORT_C TStreamId StoreL(CStreamStore &aStore) const;
Stores the field data to a stream store. Concrete field types with no persistent data should override this function to return KNullStreamId.
|
|
virtual IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aId);
Restores the field data from a stream store. Concrete field types with no persistent data should override this function to do nothing.
|
virtual IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Externalises the field data. Called by StoreL()
.
Calling this default implementation raises a panic. Concrete field classes with persistent data must provide their own implementation
of this function. Concrete field classes with no persistent data must provide a StoreL()
implementation that just returns KNullStreamId.
|
virtual void InternalizeL(RReadStream &aStream)=0;
Internalises the field data. Called by RestoreL()
.
|
virtual TInt Value(TPtr &aValueText)=0;
Sets aValueText to the current field value if the buffer is large enough. If not, aValueText is not changed, and the function returns the length which is required to hold the field's value.
|
|
virtual TUid Type() const=0;
Returns the field's type UID.
|