class RWsGraphicMsgBuf : private RBuf8;
Description
Utility class for building data buffers to be attached to CWindowGc::DrawWsGraphic(const TWsGraphicId &,const TRect &)
commands Useful when there is more than one piece of data to be attached to the draw command
Derivation
TDesC8
-
Abstract base class for 8-bit non-modifiable descriptors.
TDes8
-
Abstract base class for 8-bit modifiable descriptors.
RBuf8
-
8 bit resizable buffer descriptor.
RWsGraphicMsgBuf
- Utility class for building data buffers to be attached to CWindowGc::DrawWsGraph...
Members
Defined in RWsGraphicMsgBuf
:
Inherited from RBuf8
:
Assign(HBufC8 *)
Transfers ownership of the specified heap descriptor to this object.
Assign(TUint8 *,TInt)
Assigns ownership of the specified allocated memory to this object.
Assign(TUint8 *,TInt,TInt)
Assigns ownership of the specified allocated memory to this object.
Assign(const RBuf8 &)
Transfers ownership of the specified 8-bit resizable buffer descriptor's buffer ...
Create(TInt)
Creates an 8-bit resizable buffer descriptor.
Create(const TDesC8 &)
Creates a 8-bit resizable buffer descriptor to contain a copy of the specified (...
Create(const TDesC8 &,TInt)
Creates an 8-bit resizable buffer descriptor to contain a copy of the specified ...
CreateL(RReadStream &,TInt)
Creates an 8-bit resizable buffer descriptor that has been initialised with data...
CreateL(TInt)
Creates an 8-bit resizable buffer descriptor, and leaves on failure.
CreateL(const TDesC8 &)
Creates an 8-bit resizable buffer descriptor to contain a copy of the specified ...
CreateL(const TDesC8 &,TInt)
Creates an 8-bit resizable buffer descriptor to contain a copy of the specified ...
CreateMax(TInt)
Creates an 8-bit resizable buffer descriptor.
CreateMaxL(TInt)
Creates an 8-bit resizable buffer descriptor, and leaves on failure.
RBuf8(HBufC8 *)
Constructor.
RBuf8(TInt,TInt,TInt)
Protected constructor.
ReAlloc(TInt)
Resizes this 8-bit resizable buffer descriptor.
ReAllocL(TInt)
Resizes this 8-bit resizable buffer descriptor, leaving on failure.
Swap(RBuf8 &)
Swaps the content of two 8-bit resizable buffer descriptors.
__DECLARE_TEST
iEBufCPtrType
iEPtrType
operator=(const RBuf8 &)
Copies data into this descriptor replacing any existing data.
operator=(const TDesC8 &)
Copies data into this descriptor replacing any existing data.
operator=(const TUint8 *)
Copies data into this descriptor replacing any existing data.
Inherited from TDes8
:
Append(TChar)
Appends a character onto the end of this descriptor's data.
Append(const TDesC16 &)
Appends data onto the end of this descriptor's data.
Append(const TDesC8 &)
Appends data onto the end of this descriptor's data.
Append(const TUint8 *,TInt)
Appends data onto the end of this descriptor's data.
AppendFill(TChar,TInt)
Appends and fills this descriptor with the specified character.
AppendFormat(TRefByValue< const TDesC8 >,...)
Formats and appends text onto the end of this descriptor's data.
AppendFormat(TRefByValue< const TDesC8 >,TDes8Overflow *,...)
Formats and appends text onto the end of this descriptor's data.
AppendFormatList(const TDesC8 &,VA_LIST,TDes8Overflow *)
Formats and appends text onto the end of this descriptor's data.
AppendJustify(const TDesC8 &,TInt,TAlign,TChar)
Appends data onto the end of this descriptor's data and justifies it.
AppendJustify(const TDesC8 &,TInt,TInt,TAlign,TChar)
Appends data onto the end of this descriptor's data and justifies it.
AppendJustify(const TUint8 *,TInt,TAlign,TChar)
Appends a zero terminated string onto the end of this descriptor's data and just...
AppendJustify(const TUint8 *,TInt,TInt,TAlign,TChar)
Appends data onto the end of this descriptor's data and justifies it.
AppendNum(TInt64)
Converts the 64-bit signed integer into a decimal character representation and a...
AppendNum(TReal,const TRealFormat &)
Converts the specified floating point number into a character representation and...
AppendNum(TUint64,TRadix)
Converts the specified 64-bit unsigned integer into a character representation b...
AppendNumFixedWidth(TUint,TRadix,TInt)
Converts the specified unsigned integer into a fixed width character representat...
AppendNumFixedWidthUC(TUint,TRadix,TInt)
Converts the specified unsigned integer into a fixed width character representat...
AppendNumUC(TUint64,TRadix)
Converts the specified 64-bit unsigned integer into a character representation b...
Capitalize()
Capitalises the content of this descriptor.
Collapse()
Collapse all characters from 16 to 8 bits
Collate()
Performs collation on the content of this descriptor.
Copy(const TDesC16 &)
Copies data into this descriptor replacing any existing data.
Copy(const TDesC8 &)
Copies data into this descriptor replacing any existing data.
Copy(const TUint8 *)
Copies data into this descriptor replacing any existing data.
Copy(const TUint8 *,TInt)
Copies data into this descriptor replacing any existing data.
CopyC(const TDesC8 &)
Copies and collates data from the specified descriptor into this descriptor repl...
CopyCP(const TDesC8 &)
Copies text from the specified descriptor and capitalises it before putting it i...
CopyF(const TDesC8 &)
Copies and folds data from the specified descriptor into this descriptor replaci...
CopyLC(const TDesC8 &)
Copies text from the specified descriptor and converts it to lower case before p...
CopyUC(const TDesC8 &)
Copies text from the specified descriptor and converts it to upper case before p...
Delete(TInt,TInt)
Deletes data from this descriptor.
Expand()
Expand all characters from 8 to 16 bits
Fill(TChar)
Fills the descriptor's data area with the specified character, replacing any exi...
Fill(TChar,TInt)
Fills the descriptor's data area with the specified character, replacing any exi...
FillZ()
Fills the descriptor's data area with binary zeroes, i.e. 0x00, replacing any ex...
FillZ(TInt)
Fills the descriptor's data area with binary zeroes, i.e. 0x00, replacing any ex...
Fold()
Performs folding on the content of this descriptor.
Format(TRefByValue< const TDesC8 >,...)
Formats and copies text into this descriptor, replacing any existing data.
FormatList(const TDesC8 &,VA_LIST)
Formats and copies text into this descriptor, replacing any existing data.
Insert(TInt,const TDesC8 &)
Inserts data into this descriptor.
Justify(const TDesC8 &,TInt,TAlign,TChar)
Copies data into this descriptor and justifies it, replacing any existing data.
LeftTPtr(TInt)const
Extracts the leftmost part of the data.
LowerCase()
Converts the content of this descriptor to lower case.
MaxLength()const
Gets the maximum length of the descriptor.
MaxSize()const
Gets the maximum size of the descriptor.
MidTPtr(TInt)const
Extracts a portion of the data.
MidTPtr(TInt,TInt)const
Extracts a portion of the data.
Num(TInt64)
Converts the 64-bit signed integer into a decimal character representation and c...
Num(TReal,const TRealFormat &)
Converts the specified floating point number into a character representation and...
Num(TUint64,TRadix)
Converts the specified 64-bit unsigned integer into a character representation b...
NumFixedWidth(TUint,TRadix,TInt)
Converts the specified unsigned integer into a fixed width character representat...
NumFixedWidthUC(TUint,TRadix,TInt)
Converts the specified unsigned integer into a fixed width character representat...
NumUC(TUint64,TRadix)
Converts the specified 64-bit unsigned integer into a character representation b...
PtrZ()
Appends a zero terminator onto the end of this descriptor's data and returns a p...
Repeat(const TDesC8 &)
Copies data with repetition into this descriptor, from another descriptor, repla...
Repeat(const TUint8 *,TInt)
Copies data with repetition into this descriptor, from a memory location specifi...
Replace(TInt,TInt,const TDesC8 &)
Replaces data in this descriptor.
RightTPtr(TInt)const
Extracts the rightmost part of the data.
SetLength(TInt)
Sets the length of the data represented by the descriptor to the specified value...
SetMax()
Sets the length of the data to the maximum length of the descriptor.
Swap(TDes8 &)
Swaps the data represented by this descriptor with the data represented by the s...
TDes8(TInt,TInt,TInt)
Trim()
Deletes leading and trailing whitespace characters from the descriptor's data.
TrimAll()
Deletes leading and trailing whitespace characters from the descriptor's data an...
TrimLeft()
Deletes leading whitespace characters from the descriptor's data.
TrimRight()
Deletes trailing whitespace characters from the descriptor's data.
UpperCase()
Converts the content of this descriptor to upper case.
WPtr()const
Zero()
Sets the length of the data to zero.
ZeroTerminate()
Appends a zero terminator onto the end of this descriptor's data.
iMaxLength
operator+=(const TDesC8 &)
Appends data onto the end of this descriptor's data and returns a reference to t...
operator=(const TDes8 &)
Copies data into this descriptor replacing any existing data.
operator[](TInt)
Gets a non-const reference to a single data item within this descriptor's data.
operator[](TInt)const
Gets a const reference to a single data item within this descriptor's data.
Inherited from TDesC8
:
Construction and destruction
IMPORT_C RWsGraphicMsgBuf();
Description
Default Constructor
IMPORT_C void Close();
Description
IMPORT_C void CleanupClosePushL();
Description
Append(TUid,const TDesC8 &)
IMPORT_C TInt Append(TUid aTypeId, const TDesC8 &aData);
Description
Append a descriptor as data
Parameters
TUid aTypeId |
the type of the message to append
|
const TDesC8 &aData |
arbitrary length data consisting of the whole message
|
|
Return value
TInt
|
KErrNone if successful, else a system-wide error code
|
|
Append(TUid,const TDesC16 &)
IMPORT_C TInt Append(TUid aTypeId, const TDesC16 &aData);
Description
Append a descriptor as data
Parameters
TUid aTypeId |
the type of the message to append
|
const TDesC16 &aData |
arbitrary length data consisting of the whole message
|
|
Return value
TInt
|
KErrNone if successful, else a system-wide error code
|
|
Append(TUid,TInt,TPtr8 &)
IMPORT_C TInt Append(TUid aTypeId, TInt aLen, TPtr8 &aPtr);
Description
Append a message of the specified length and type, and return a pointer to allow client code to modify the message. aPtr is
only set if the append succeeds. aPtr is only valid until the next message is appended to the buffer.
Parameters
TUid aTypeId |
the type of the message to append
|
TInt aLen |
the length of the message to be reserved
|
TPtr8 &aPtr |
a modifiable descriptor to be used by the client code to write into the message body
|
|
Return value
TInt
|
KErrNone if successful, else a system-wide error code
|
|
Append(const TWsGraphicMsgFixedBase &)
IMPORT_C TInt Append(const TWsGraphicMsgFixedBase &aMsg);
Description
Append a fixed-size message
Parameters
Return value
TInt
|
KErrNone if successful, else a system-wide error code
|
|
IMPORT_C void Remove(TInt aIndex);
Description
Remove a message from the buffer
Parameters
TInt aIndex |
the ordinal position of message to be removed
|
|
Panic codes
if |
the index is out of bounds
|
|
IMPORT_C TInt Count() const;
Description
Returns the number of messages in the buffer
Return value
TInt
|
the number of messages in the buffer
|
|
IMPORT_C TUid TypeId(TInt aIndex) const;
Description
Returns the Type ID of a message in the buffer
Parameters
TInt aIndex |
the ordinal position of the message
|
|
Return value
TUid
|
the Type ID of the message
|
|
Panic codes
if |
the index is out of bounds
|
|
IMPORT_C TPtrC8 Data(TInt aIndex) const;
Description
Returns a non-modifiable descriptor of a message body in the buffer
Parameters
TInt aIndex |
the ordinal position of the message
|
|
Return value
Panic codes
if |
the index is out of bounds
|
|
IMPORT_C TPtr8 Data(TInt aIndex);
Description
Returns a modifiable descriptor of a message body in the buffer The returned TPtr8
is only valid until the next message is appended to the buffer.
Parameters
TInt aIndex |
the ordinal position of the message
|
|
Return value
Panic codes
if |
the index is out of bounds
|
|
GetFixedMsg(TWsGraphicMsgFixedBase &,TInt)const
IMPORT_C void GetFixedMsg(TWsGraphicMsgFixedBase &aMsg, TInt aIndex) const;
Description
Returns a copy of a fixed-size message in the buffer
Parameters
Panic codes
if |
the index is out of bounds
|
the |
message specified is not of the correct type
|
|
IMPORT_C const TDesC8& Pckg() const;
Description
Returns the message buffer as a descriptor. Example:
RWsGraphicMsgBuf msgBuf;
msgBuf.Append(...);
...
TWsGraphicId id(...);
SystemGc().DrawWsGraphic(id,Rect(),msgBuf.Pckg());
msgBuf.Close();
Return value
See also: