#include <fldbltin.h>
Link against: field.lib
| class CFileNameField : public CTextField, public CTextField |
| Protected Attributes | |
|---|---|
| MFieldFileNameInfo * | iFileNameInfo |
| Public Member Functions | |
|---|---|
| virtual void | InternalizeL(RReadStream &) |
| virtual IMPORT_C void | RestoreL(const CStreamStore &, TStreamId) |
| void | SetFileNameInfo(MFieldFileNameInfo *) |
| virtual IMPORT_C TStreamId | StoreL(CStreamStore &) |
| virtual IMPORT_C TUid | Type() |
| virtual IMPORT_C TInt | Value(TPtr &) |
A filename field.
This is a field which evaluates to the filename of the current document. Before the filename field can be evaluated, it must be passed a pointer to an object which implements the UpdateFieldFileName() function.
| MFieldFileNameInfo * | iFileNameInfo | [protected] |
| void | InternalizeL | ( | RReadStream & | ) | [inline, virtual] |
Reimplemented from CTextField::InternalizeL(RReadStream &)
Overrides the base class method to do nothing, because this class has no persistent data.
| IMPORT_C void | RestoreL | ( | const CStreamStore & | aStore, |
| TStreamId | aId | |||
| ) | [virtual] | |||
Reimplemented from CTextField::RestoreL(const CStreamStore &,TStreamId)
Restores the field data from a stream store. Concrete field types with no persistent data should override this function to do nothing.
| Parameters | |
|---|---|
| aStore | Stream store containing the field data to restore. |
| aId | The ID of the stream store in which the field data was previously stored. |
| void | SetFileNameInfo | ( | MFieldFileNameInfo * | aInfo | ) | [inline] |
Sets the object which implements the UpdateFieldFileName() function, to get the current document's filename. SetFileNameInfo() must be called before the filename field can be evaluated.
| Parameters | |
|---|---|
| aInfo | Pointer to an object which implements the UpdateFieldFileName() function. |
| IMPORT_C TStreamId | StoreL | ( | CStreamStore & | aStore | ) | const [virtual] |
Reimplemented from CTextField::StoreL(CStreamStore &)const
Stores the field data to a stream store. Concrete field types with no persistent data should override this function to return KNullStreamId.
| Parameters | |
|---|---|
| aStore | Stream store to which the field data is written. |
| IMPORT_C TUid | Type | ( | ) | const [virtual] |
Reimplemented from CTextField::Type()const
Gets the field's type UID.
Reimplemented from CTextField::Value(TPtr &)
Gets the document's filename, by calling UpdateFieldFileName() (implemented by the object passed to the filename field using SetFileNameInfo()).
Note
SetFileNameInfo() must have been called beforehand, or a panic occurs.
| Parameters | |
|---|---|
| aValueText | Descriptor which on return contains the document's filename. |