Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: FLDBLTIN.H
Link against: field.lib

Class CFileNameField

class CFileNameField : public CTextField;

Description

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.

Derivation

Members

Defined in CFileNameField:
InternalizeL(), RestoreL(), SetFileNameInfo(), StoreL(), Type(), Value(), iFileNameInfo

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CTextField:
ExternalizeL()


Member functions


SetFileNameInfo()

inline void SetFileNameInfo(MFieldFileNameInfo *aInfo);

Description

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

MFieldFileNameInfo *aInfo

Pointer to an object which implements the UpdateFieldFileName() function.


StoreL()

virtual IMPORT_C TStreamId StoreL(CStreamStore &aStore) const;

Description

Stores the field data to a stream store. Concrete field types with no persistent data should override this function to return KNullStreamId.

Parameters

CStreamStore &aStore

Stream store to which the field data is written.

Return value

TStreamId

The ID of the stream store.


RestoreL()

virtual IMPORT_C void RestoreL(const CStreamStore &aStore, TStreamId aId);

Description

Restores the field data from a stream store. Concrete field types with no persistent data should override this function to do nothing.

Parameters

const CStreamStore &aStore

Stream store containing the field data to restore.

TStreamId aId

The ID of the stream store in which the field data was previously stored.


Value()

virtual IMPORT_C TInt Value(TPtr &aValueText);

Description

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

TPtr &aValueText

Descriptor which on return contains the document's filename.

Return value

TInt

Zero if aValueText is long enough to hold the filename. Otherwise, the length of the buffer which is required to hold the filename.


InternalizeL()

inline virtual void InternalizeL(RReadStream &);

Description

Overrides the base class method to do nothing, because this class has no persistent data.

Parameters

RReadStream &


Type()

virtual IMPORT_C TUid Type() const;

Description

Gets the field's type UID.

Return value

TUid

KFileNameFieldUid.

[Top]


Member data


iFileNameInfo

protected: MFieldFileNameInfo * iFileNameInfo;

Description