Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Blob Class Reference

Binary large objects.

#include <tntdb/bits/blob.h>

List of all members.

Public Member Functions

 Blob (const char *data, std::size_t len)
 Blob (IBlob *b)
void assign (const char *data, std::size_t len)
char * reserve (std::size_t len, bool shrink=false)
bool operator== (const Blob &b) const
bool operator!= (const Blob &b) const
const char * data () const
std::size_t size () const

Classes

struct  Release
 Release policy for SmartPtr. More...


Constructor & Destructor Documentation

Blob ( const char *  data,
std::size_t  len 
)

Construct a Blob with data of a given length

Constructs a Blob using a default implementation using new/delete to manage the blob-data and the shared data object. The first len bytes of the data pointed to by data are copied to this Blob.

Blob ( IBlob b  )  [explicit]

Construct a Blob to use a customized implementation


Member Function Documentation

void assign ( const char *  data,
std::size_t  len 
)

assigns the data to this blob object

char* reserve ( std::size_t  len,
bool  shrink = false 
)

makes sure, the buffer it at least len bytes. If shrink is set, the buffer will be exactly len bytes. Data is not preserved when reallocated.

const char* data (  )  const

Returns a pointer to the data or 0 if no data is set.

std::size_t size (  )  const

Returns the size of the data

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6