|
||
class RTextBuf;
A simple class that encapsulates a text string.
As with the descriptor classes, the class sets a maximum length for the encapsulated string, which cannot be exceeded. The
class might be preferred to a descriptor in some circumstances as its maximum length can be increased (unlike a TBuf
), and it can be created on the stack (unlike an HBufC) .
Defined in RTextBuf
:
Close()
MaxLength()const
Gets the maximum length of the text.RTextBuf()
Default constructor. SetMaxLengthL(TInt)
Sets the maximum length of the text that the object can store.SetText(const TDesC &)
Sets the text. You must have set the maximum length appropriately first with RTe...Text()
Gets the text as a descriptor.Text()const
Gets the text as a descriptor.~RTextBuf()
Destructor. inline TPtr& Text();
Gets the text as a descriptor.
|
inline const TPtr& Text() const;
Gets the text as a descriptor.
|
inline TInt MaxLength() const;
Gets the maximum length of the text.
|
inline void SetText(const TDesC &aDes);
Sets the text. You must have set the maximum length appropriately first with RTextBuf::SetMaxLengthL(TInt)
.
|
IMPORT_C void SetMaxLengthL(TInt aMaxLength);
Sets the maximum length of the text that the object can store.
Attempts to store text beyond the maximum length cause a panic, as with descriptors.
|
IMPORT_C void Close();