Blob Class Reference

A Binary Large OBject (BLOB). More...

#include <Blob.h>

List of all members.

Public Member Functions

 Blob ()
 Blob (const std::vector< unsigned char > &value)
 Blob (const void *pValue, size_t len)
BROKEN_INLINE_HINT Bloboperator= (const Blob &right)
bool operator== (const Blob &right) const
const std::vector< unsigned
char > & 
get () const
 operator const std::vector< unsigned char > & () const


Detailed Description

A Binary Large OBject (BLOB).

This class exists because the serialization/deserialization of std::vector<unsigned char> is not recommended for large quantities of data even though this is a natural representation of a large quantity of data. XML representations of this class are not generally human readable. This class does not provide a set() function and that is by design. The StringUtilities::toDisplayString() and StringUtilities::fromDisplayString() specializations of this class are not guaranteed to return useful information.

Definition at line 26 of file Blob.h.


Constructor & Destructor Documentation

Blob::Blob (  ) 

Construct a default object.

The value returned from get() will be an empty vector. This constructor shouldn't normally be used; you should use the constructor that takes an initial value. This constructor is provided because in order to allow this type inside a DataVariant, a default constructor is required.

Definition at line 35 of file Blob.h.

Blob::Blob ( const std::vector< unsigned char > &  value  )  [explicit]

Construct an object from a std::vector of unsigned char data.

Parameters:
value An array containing the data.

Definition at line 43 of file Blob.h.

Blob::Blob ( const void *  pValue,
size_t  len 
) [explicit]

Construct a blob from a C array of octets.

Parameters:
pValue C array of octets with len bytes. If this is NULL, an empty blob is created.
len The number of octets in the array.

Definition at line 53 of file Blob.h.


Member Function Documentation

BROKEN_INLINE_HINT Blob& Blob::operator= ( const Blob right  ) 

Assignment operator.

Parameters:
right The right hand of the assignment.
Returns:
A reference to *this, which has been changed to have a copy of the contents of right.

Definition at line 74 of file Blob.h.

bool Blob::operator== ( const Blob right  )  const

Compares two Blob objects.

Parameters:
right The object to compare with.
Returns:
Returns true if both Blob objects wrap equivalent data.

Definition at line 91 of file Blob.h.

const std::vector<unsigned char>& Blob::get (  )  const

Access the data.

This class does not provide a set() function and that is by design. You must use the Blob constructor to set a value into this object.

Returns:
Returns the wrapped data.

Definition at line 103 of file Blob.h.

Blob::operator const std::vector< unsigned char > & (  )  const

Access the data.

Returns:
Returns the data.

Definition at line 113 of file Blob.h.


Software Development Kit - Opticks 4.9.0 Build 16218