The Nebula Device 3: Util::Blob Class Reference

The Nebula Device 3

Util::Blob Class Reference

#include <blob.h>


Detailed Description

The Util::Blob class encapsulates a chunk of raw memory into a C++ object which can be copied, compared and hashed.

(C) 2006 Radon Labs GmbH

Public Member Functions

void * operator new (size_t size)
 overloaded operator new
void operator delete (void *p)
 overloaded operator delete
 Blob ()
 default constructor
 Blob (const void *ptr, SizeT size)
 constructor
 Blob (SizeT size)
 reserve N bytes
 Blob (const Blob &rhs)
 copy constructor
 ~Blob ()
 destructor
void operator= (const Blob &rhs)
 assignment operator
bool operator== (const Blob &rhs) const
 equality operator
bool operator!= (const Blob &rhs) const
 inequality operator
bool operator> (const Blob &rhs) const
 greater operator
bool operator< (const Blob &rhs) const
 less operator
bool operator>= (const Blob &rhs) const
 greater-equal operator
bool operator<= (const Blob &rhs) const
 less-eqial operator
bool IsValid () const
 return true if the blob contains data
void Reserve (SizeT size)
 reserve N bytes
void Set (const void *ptr, SizeT size)
 set blob contents
void * GetPtr () const
 get blob ptr
SizeT Size () const
 get blob size
IndexT HashCode () const
 get a hash code (compatible with Util::HashTable)

Static Public Member Functions

static void Setup ()
 static Setup method, called by Util::Setup()