TBufC16 Class Reference

class TBufC16 : public TBufCBase16

16-bit non-modifiable buffer descriptor.

This is a descriptor class which provides a buffer of fixed length for containing and accessing TUint16 data.

The class intended for instantiation. The 16-bit data that the descriptor represents is part of the descriptor object itself.

The class is templated, based on an integer value which defines the size of the descriptor's data area.

The data is intended to be accessed, but not modified; however, it can be completely replaced using the assignment operators of this class. The base class provides the functions through which the data is accessed.

TBufC TDesC16 TPtr16 TUint16

Inherits from

Public Member Functions
TBufC16 ()
TBufC16 (const TUint16 *)
TBufC16 (const TDesC16 &)
TPtr16 Des ()
TBufC16 < S > & operator= (const TUint16 *)
TBufC16 < S > & operator= (const TDesC16 &)
Inherited Functions
TBufCBase16::Copy(const TDesC16 &,TInt)
TBufCBase16::Copy(const TUint16 *,TInt)
TBufCBase16::DoDes(TInt)
TBufCBase16::TBufCBase16()
TBufCBase16::TBufCBase16(TInt)
TBufCBase16::TBufCBase16(const TDesC16 &,TInt)
TBufCBase16::TBufCBase16(const TUint16 *,TInt)
TBufCBase16::WPtr()const
TDesC16::Alloc()const
TDesC16::AllocL()const
TDesC16::AllocLC()const
TDesC16::AtC(TInt)const
TDesC16::Compare(const TDesC16 &)const
TDesC16::CompareC(const TDesC16 &)const
TDesC16::CompareC(const TDesC16 &,TInt,const TCollationMethod *)const
TDesC16::CompareF(const TDesC16 &)const
TDesC16::DoSetLength(TInt)
TDesC16::Find(const TDesC16 &)const
TDesC16::Find(const TUint16 *,TInt)const
TDesC16::FindC(const TDesC16 &)const
TDesC16::FindC(const TDesC16 &,TInt &,const TCollationMethod &,TInt)const
TDesC16::FindC(const TUint16 *,TInt)const
TDesC16::FindC(const TUint16 *,TInt,TInt)const
TDesC16::FindF(const TDesC16 &)const
TDesC16::FindF(const TUint16 *,TInt)const
TDesC16::GetCollationKeysL(TInt,const TCollationMethod *)const
TDesC16::GetFoldedDecomposedFormL()const
TDesC16::GetNormalizedDecomposedFormL()const
TDesC16::HasPrefixC(const TDesC16 &,TInt,const TCollationMethod *)const
TDesC16::Left(TInt)const
TDesC16::Length()const
TDesC16::Locate(TChar)const
TDesC16::LocateF(TChar)const
TDesC16::LocateReverse(TChar)const
TDesC16::LocateReverseF(TChar)const
TDesC16::Match(const TDesC16 &)const
TDesC16::MatchC(const TDesC16 &)const
TDesC16::MatchC(const TDesC16 &,TInt,TInt,TInt,TInt,const TCollationMethod *)const
TDesC16::MatchC(const TDesC16 &,const TCollationMethod *,TInt,TInt,TInt,TInt)const
TDesC16::MatchF(const TDesC16 &)const
TDesC16::Mid(TInt)const
TDesC16::Mid(TInt,TInt)const
TDesC16::Ptr()const
TDesC16::Right(TInt)const
TDesC16::Size()const
TDesC16::TDesC16()
TDesC16::TDesC16(TInt,TInt)
TDesC16::Type()const
TDesC16::operator!=(const TDesC16 &)const
TDesC16::operator<(const TDesC16 &)const
TDesC16::operator<=(const TDesC16 &)const
TDesC16::operator==(const TDesC16 &)const
TDesC16::operator>(const TDesC16 &)const
TDesC16::operator>=(const TDesC16 &)const
TDesC16::operator[](TInt)const
Inherited Enumerations
TDesC16:TPrefix
Protected Attributes
TUint16 iBuf

Constructor & Destructor Documentation

TBufC16()

TBufC16 ( ) [inline]

Constructs an empty 16-bit non-modifiable buffer descriptor.

It contains no data.

The integer template parameter determines the size of the data area which is created as part of the buffer descriptor object.

Data can, subsequently, be assigned into this buffer descriptor using the assignment operators.

TBufC16::operator=

TBufC16(const TUint16 *)

TBufC16 ( const TUint16 * aString ) [inline]

Constructs the 16-bit non-modifiable buffer descriptor from a zero terminated string.

The integer template parameter determines the size of the data area which is created as part of this object.

The string, excluding the zero terminator, is copied into this buffer descriptor's data area. The length of this buffer descriptor is set to the length of the string, excluding the zero terminator.

panic
USER 8, if the length of the string, excluding the zero terminator, is greater than the value of the integer template parameter.

Parameters

const TUint16 * aString A pointer to a zero terminated string.

TBufC16(const TDesC16 &)

TBufC16 ( const TDesC16 & aDes ) [inline]

Constructs the 16-bit non-modifiable buffer descriptor from any existing descriptor.

The integer template parameter determines the size of the data area which is created as part of this object.

Data is copied from the source descriptor into this buffer descriptor and the length of this buffer descriptor is set to the length of the source descriptor.

panic
USER 8, if the length of the source descriptor is greater than the value of the integer template parameter.

Parameters

const TDesC16 & aDes The source 16-bit non-modifiable descriptor.

Member Functions Documentation

Des()

TPtr16 Des ( ) [inline]

Creates and returns a 16-bit modifiable pointer descriptor for the data represented by this 16-bit non-modifiable buffer descriptor.

The content of a non-modifiable buffer descriptor normally cannot be altered, other than by complete replacement of the data. Creating a modifiable pointer descriptor provides a way of changing the data.

The modifiable pointer descriptor is set to point to this non-modifiable buffer descriptor's data.

The length of the modifiable pointer descriptor is set to the length of this non-modifiable buffer descriptor.

The maximum length of the modifiable pointer descriptor is set to the value of the integer template parameter.

When data is modified through this new pointer descriptor, the lengths of both it and this constant buffer descriptor are changed.

operator=(const TUint16 *)

TBufC16 < S > & operator= ( const TUint16 * aString ) [inline]

Copies data into this descriptor replacing any existing data.

The length of this descriptor is set to reflect the new data.

panic
USER 11, if the length of the string, excluding the zero terminator, is greater than the maximum length of this (target) descriptor.

Parameters

const TUint16 * aString A pointer to a zero-terminated string.

operator=(const TDesC16 &)

TBufC16 < S > & operator= ( const TDesC16 & aDes ) [inline]

Copies data into this descriptor, replacing any existing data.

The length of this descriptor is set to reflect the new data.

panic
USER 11, if the length of the descriptor aDes is greater than the maximum length of this (target) descriptor.

Parameters

const TDesC16 & aDes A 16-bit non-modifiable descriptor.

Member Data Documentation

TUint16 iBuf

TUint16 iBuf [protected]