#include <fldbase.h>
class CTextField : public CBase |
Public Member Functions | |
---|---|
virtual IMPORT_C void | ExternalizeL(RWriteStream &) |
pure virtual void | InternalizeL(RReadStream &) |
virtual IMPORT_C void | RestoreL(const CStreamStore &, TStreamId) |
virtual IMPORT_C TStreamId | StoreL(CStreamStore &) |
pure virtual TUid | Type() |
pure virtual TInt | Value(TPtr &) |
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).
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
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.
Parameter | Description |
---|---|
aStream | Not used. |
void | InternalizeL | ( | RReadStream & | aStream | ) | [pure virtual] |
Internalises the field data. Called by RestoreL().
Parameter | Description |
---|---|
aStream | Stream from which the field data should be internalised. |
IMPORT_C void | RestoreL | ( | const CStreamStore & | aStore, |
TStreamId | aId | |||
) | [virtual] |
Restores the field data from a stream store. Concrete field types with no persistent data should override this function to do nothing.
Parameter | Description |
---|---|
aStore | Stream store containing the field data to restore. |
aId | The ID of the stream store in which the field data was previously stored. |
IMPORT_C TStreamId | StoreL | ( | CStreamStore & | aStore | ) | const [virtual] |
Stores the field data to a stream store. Concrete field types with no persistent data should override this function to return KNullStreamId.
Parameter | Description |
---|---|
aStore | Stream store to which the field data is written. |
Returns: The ID of the stream store.
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.
Parameter | Description |
---|---|
aValueText | Descriptor which on return contains the field's updated value. |
Returns: Zero on success, otherwise, the length of the buffer which is required to hold the field's updated value.