qpid::framing::Blob< Size, BaseType > Class Template Reference

A "blob" is a chunk of memory which can contain a single object at a time arbitrary type, provided sizeof(T)<=blob.size(). More...

#include <Blob.h>

Inheritance diagram for qpid::framing::Blob< Size, BaseType >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Blob ()
 Construct an empty blob.
 Blob (const Blob &b)
 Copy a blob.
template<class InPlace>
 Blob (const InPlace &expr, typename EnableInPlace< InPlace >::type *=0)
 Construct from in_place constructor.
template<class T>
 Blob (const T &t, typename DisableInPlace< T >::type *=0)
 Construct by copying an objecct constructor.
Bloboperator= (const Blob &b)
 Assign from another blob.
template<class InPlace>
EnableInPlace< InPlace, Blob
& >::type 
operator= (const InPlace &expr)
 Assign from an in_place constructor expression.
template<class T>
DisableInPlace< T, Blob
& >::type 
operator= (const T &x)
 Assign from an object of type T.
BaseType * get ()
 Get pointer to blob contents, returns 0 if empty.
const BaseType * get () const
 Get pointer to blob contents, returns 0 if empty.
void clear ()
 Destroy the object in the blob making it empty.
bool empty () const

Static Public Member Functions

static size_t size ()

Detailed Description

template<size_t Size, class BaseType = void>
class qpid::framing::Blob< Size, BaseType >

A "blob" is a chunk of memory which can contain a single object at a time arbitrary type, provided sizeof(T)<=blob.size().

Blob ensures proper construction and destruction of its contents, and proper copying between Blobs, but nothing else.

In particular the user must ensure the blob is big enough for its contents and must know the type of object in the blob to cast get().

If BaseType is specified then only object that can be safely static_cast to BaseType may be stored in the Blob.


The documentation for this class was generated from the following file:
Generated on Thu Apr 10 11:09:06 2008 for Qpid by  doxygen 1.4.7