alpha version, October 2000
The CXData instances represent generic data chunks. Currently they are used just with the CXString instances for the UNICODE support (and for input-output in the XConversion framework), but the XSdk is in an extremely early state; there is much more scheduled for future...
+CXData *dataWithlength(void *buffer,int length);
Returns a newly created data with the contents copied from the buffer given. The data are copied into the new object; there is currently no support for a shared data (but there will be in near future).
+CXData *dataWith(const TDesC &des);
Returns a newly created data with the contents copied from the Epoc descriptor given. The data are copied into the new object; there is currently no support for a shared data (but there will be in near future).
-id initWith(const TDesC °s); // primitive
<<description forthcoming>>
-id initWith(void *buffer,int length);
<<description forthcoming>>
-int length;
Returns the length in bytes of the stored data.
-const unsigned char *bytes;
Returns the pointer to the stored data; all the data are returned in one long chunk. Do not use this method unless you really need to, for it might be quite ineffective: in case the data contents is segmented, a new buffer would have to be allocated.
In a very near future there will be an API to allow for an effective access to a segmented buffers.
-TDesC8 *eBytes;
Returns the data as a pointer to an Epoc descriptor (thence the name, for "an Epoc way of representing bytes"). Note the comment for the bytes method above!
-TDesC8 *eBytesWithRange(XRange rr);
In some conditions might be much more convenient just gain an Epoc access to a part of the data, than making a subdata and getting its full contents.
-unsigned char byteAtIndex(int index);
Returns the byte at the index given. This method is always preferrable to the bytes or eBytes ones (see them for the reasons).
Copyright © 1999-2000 X.soft, all rights reserved