Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: fldbltin.h
Link against: field.lib

Class CFileNameField

CFileNameField

Support

Supported from 5.0

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

CBaseBase class for all classes to be instantiated on the heap
CFileNameFieldA filename field
CTextFieldThe abstract base class for all fields

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

Inherited from CBase:
operator new()

Inherited from CTextField:
ExternalizeL()


Evaluate field


Value()

virtual 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.


SetFileNameInfo()

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.

[Top]


Field type


Type()

TUid Type()const;

Description

Gets the field's type UID.

Return value

TUid

KFileNameFieldUid.

[Top]


Stream persistence


InternalizeL()

virtual void InternalizeL(RReadStream& /*aStream*/);

Description

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


RestoreL()

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

Description

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


StoreL()

virtual TStreamId StoreL(CStreamStore& aStore)const;

Description

Returns KNullStreamId, overriding the base class method, because this class has no persistent data.