Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

d_Binary Class Reference

#include <d_Binary.h>

Inheritance diagram for d_Binary:

d_String List of all members.

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

Detailed Description

Manages binary data.

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


Constructor & Destructor Documentation

d_Binary::d_Binary oUInt4    iSize = DEFAULT_SIZE,
oUInt4    iStep = DEFAULT_STEP
 

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).

SEE ALSO: reserve(), getSize()

d_Binary::d_Binary const char *    iData,
oUInt4    iLength
 

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.

SEE ALSO: append(), set()

d_Binary::~d_Binary  
 

Destructor.


Member Function Documentation

bool d_Binary::append const d_Binary &    iSource [inline]
 

Append another d_Binary object to the end of own data.

bool d_Binary::append const char *    iData,
oUInt4    iLength
[inline]
 

Append a raw buffer to the end of own data.

void d_Binary::cut oUInt4    iStart,
oUInt4    iLength
 

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.

bool d_Binary::get d_Binary &    iData,
oUInt4    iStart = 0,
oUInt4    iLength = 0
const
 

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.

bool d_Binary::get const char *    iData,
oUInt4    iStart,
oUInt4    iLength
const
 

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.

oUInt4 d_Binary::getLength   const [inline]
 

Returns the current length of buffer in bytes.

SEE ALSO: getSize()

oUInt4 d_Binary::getSize   const [inline]
 

Returns the current size of buffer in bytes.

The size is always grather or equals to the effective buffer length.

SEE ALSO: getLength()

bool d_Binary::insert char *    iData,
oUInt4    iStart,
oUInt4    iLength
 

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.

bool d_Binary::insert d_Binary &    iSource,
oUInt4    iStart
 

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.

const char * d_Binary::raw oUInt4    iStart = 0 const [inline]
 

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.

bool d_Binary::reserve oUInt4    iSize
 

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()

void d_Binary::reset   [inline]
 

Reset the internal buffer.

bool d_Binary::set d_Binary &    iSource,
oUInt4    iStart
[inline]
 

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.

bool d_Binary::set const char *    iData,
oUInt4    iStart,
oUInt4    iLength
 

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.


Friends And Related Function Documentation

friend class _ODLL d_String [friend]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 29 17:12:14 2002 for Orient ODBMS Just Edition v. 2.0e by doxygen1.3-rc1