#include <d_Binary.h>
Inheritance diagram for d_Binary:

Public Methods | |
| d_Binary (oUInt4 iSize=DEFAULT_SIZE, oUInt4 iStep=DEFAULT_STEP) | |
| d_Binary (const char *iData, oUInt4 iLength) | |
| ~d_Binary () | |
| void | reset () |
| bool | append (const char *iData, oUInt4 iLength) |
| bool | append (const d_Binary &iSource) |
| bool | get (const char *iData, oUInt4 iStart, oUInt4 iLength) const |
| bool | get (d_Binary &iData, oUInt4 iStart=0, oUInt4 iLength=0) const |
| bool | set (const char *iData, oUInt4 iStart, oUInt4 iLength) |
| bool | set (d_Binary &iSource, oUInt4 iStart) |
| bool | insert (d_Binary &iSource, oUInt4 iStart) |
| bool | insert (char *iData, oUInt4 iStart, oUInt4 iLength) |
| void | cut (oUInt4 iStart, oUInt4 iLength) |
| oUInt4 | getLength () const |
| oUInt4 | getSize () const |
| const char * | raw (oUInt4 iStart=0) const |
| bool | reserve (oUInt4 iSize) |
Friends | |
| class _ODLL | d_String |
d_Binary is the type for managing binary data. It's like the BLOB (Binary Large Object Block) type of Relational DBMS.
It permits to save any information: texts, pictures, movies, sounds, etc. The size limit of a d_Binary object is 2^32 for 32bit systems.
USAGE: d_Binary ;
Where: : NAME OF VARIABLE
EXAMPLES: class Employee : public d_Object { d_Binary photo; * JPEG FORMAT };
* Use a d_Binary object in app d_Binary stream;
ODMG: Extension
|
||||||||||||
|
Default constructor. specifies the start size in bytes of d_Binary object. If not specified will be taken the default value (256 bytes). specifies the size in bytes of step of increment when the d_Binary becames full. If not specified will be taken the default value (64 bytes). |
|
||||||||||||
|
Create a d_Binary object by a raw buffer. is a char* that points to the begin of buffer. is the size in bytes of buffer. The buffer will be copied into the d_Binary object. |
|
|
Destructor. |
|
|
Append another d_Binary object to the end of own data. |
|
||||||||||||
|
Append a raw buffer to the end of own data. |
|
||||||||||||
|
Erase a portion of buffer. Data at the right of the portion to erase will be moved on left. is the offset from the begin of own d_Binary buffer. is the size in bytes of buffer. |
|
||||||||||||||||
|
Copy d_Buffer data in to another d_Binary object. is the d_Binary object where the buffer is copied. is the size in bytes of buffer to copy. If is equals to 0, then copy all buffer. is the offset from the begin of buffer. |
|
||||||||||||||||
|
Copy d_Buffer data in to a raw buffer. is a char* that points to the begin of buffer. is the size in bytes of buffer to copy and is the offset from the begin of buffer. |
|
|
Returns the current length of buffer in bytes. SEE ALSO: getSize() |
|
|
Returns the current size of buffer in bytes. The size is always grather or equals to the effective buffer length. SEE ALSO: getLength() |
|
||||||||||||||||
|
Insert a buffer in the current object. The buffer of size is inserted by position moving the data on the right. is the buffer to insert. is the offset from the begin of own d_Binary buffer. is the size of buffer to insert. |
|
||||||||||||
|
Insert a d_Binary object in the current object. The object is inserted by position moving the data on the right. is the d_Binary object to insert. is the offset from the begin of own d_Binary buffer. |
|
|
Returns the pointer to the internal buffer. This method permits to access to the d_Binary buffer without copy it. Applications should use this method just to read the buffer data and not for write. If is specified, then returns the pointer of the internal buffer plus offset. |
|
|
Reserve space for data. is the size in bytes of space to reserve. If is minor than actual size, then the extra data will be lost. SEE ALSO: d_Binary(), getSize() |
|
|
Reset the internal buffer. |
|
||||||||||||
|
Copy data from a d_Binary object. All object is copied. is the d_Binary object to copy. is the offset from the begin of own d_Binary buffer. |
|
||||||||||||||||
|
Copy a raw buffer in the d_Binary object. is a char* that points to the begin of buffer. is the size in bytes of buffer to copy and is the offset from the begin of d_Binary buffer. |
|
|
|
1.3-rc1