xyzzy::TShmAlloc Class Reference

#include <shmalloc.hxx>

List of all members.

Public Member Functions

 TShmAlloc (const char *key, size_t size, bool create=true)
 TShmAlloc (const char *keyAndSize, bool create=true)
ptrdiff_t alloc (size_t)
void * ptr (ptrdiff_t offset) const
void * base () const
void destroy ()
const char * getKey () const
size_t getMaxSize () const
 ~TShmAlloc ()

Static Public Member Functions

static TShmAlloctheOne ()

Private Member Functions

void init (const char *key, size_t size, bool create)

Private Attributes

int m_schmid
void * m_shmBase
size_t m_maxSize
size_t m_used
std::string m_key

Static Private Attributes

static TShmAllocm_stTheOne


Detailed Description

A singleton class of shared memory allocator.


Constructor & Destructor Documentation

xyzzy::TShmAlloc::TShmAlloc ( const char *  key,
size_t  size,
bool  create = true 
) [explicit]

xyzzy::TShmAlloc::TShmAlloc ( const char *  keyAndSize,
bool  create = true 
) [explicit]

xyzzy::TShmAlloc::~TShmAlloc (  )  [inline]


Member Function Documentation

ptrdiff_t xyzzy::TShmAlloc::alloc ( size_t   ) 

void* xyzzy::TShmAlloc::ptr ( ptrdiff_t  offset  )  const [inline]

void* xyzzy::TShmAlloc::base (  )  const [inline]

static TShmAlloc* xyzzy::TShmAlloc::theOne (  )  [inline, static]

void xyzzy::TShmAlloc::destroy (  ) 

const char* xyzzy::TShmAlloc::getKey (  )  const [inline]

size_t xyzzy::TShmAlloc::getMaxSize (  )  const [inline]

void xyzzy::TShmAlloc::init ( const char *  key,
size_t  size,
bool  create 
) [private]


Member Data Documentation

int xyzzy::TShmAlloc::m_schmid [private]

void* xyzzy::TShmAlloc::m_shmBase [private]

size_t xyzzy::TShmAlloc::m_maxSize [private]

size_t xyzzy::TShmAlloc::m_used [private]

std::string xyzzy::TShmAlloc::m_key [private]

TShmAlloc * xyzzy::TShmAlloc::m_stTheOne [static, private]


The documentation for this class was generated from the following files:
Generated on Thu Mar 22 13:51:08 2007 for anvil by  doxygen 1.5.1