StSharedMemory Class Reference

#include <stsharedmemory.h>

List of all members.

Public Member Functions

 StSharedMemory ()
 StSharedMemory (const StSharedMemory &copy)
 ~StSharedMemory ()
void malloc (unsigned size)
void realloc (unsigned size)
void free ()
void renew ()
void * getPointer () const
unsigned getMemorySize () const
unsigned getInstances () const
void setMemorySize (unsigned size)
void setMemoryPointer (void *pointer)
void makeCopy ()
char & operator[] (unsigned index)
const char & operator[] (unsigned index) const
StSharedMemoryoperator= (const StSharedMemory &copy)

Private Member Functions

void clean ()
void init ()
void lock ()
void unlock ()

Private Attributes

unsigned * instances
unsigned memorySize
void * pointer


Constructor & Destructor Documentation

StSharedMemory::StSharedMemory (  )  [inline]

StSharedMemory::StSharedMemory ( const StSharedMemory copy  )  [inline]

StSharedMemory::~StSharedMemory (  )  [inline]


Member Function Documentation

void StSharedMemory::clean (  )  [inline, private]

If no instances are left memory will be freed.

void StSharedMemory::free (  )  [inline]

Free memory

unsigned StSharedMemory::getInstances (  )  const [inline]

unsigned StSharedMemory::getMemorySize (  )  const [inline]

void* StSharedMemory::getPointer (  )  const [inline]

void StSharedMemory::init (  )  [inline, private]

void StSharedMemory::lock (  )  [inline, private]

void StSharedMemory::makeCopy (  )  [inline]

If data should no longer be shared with other instances, use this function

void StSharedMemory::malloc ( unsigned  size  )  [inline]

Malloc new memory

StSharedMemory & StSharedMemory::operator= ( const StSharedMemory copy  )  [inline]

const char& StSharedMemory::operator[] ( unsigned  index  )  const [inline]

char& StSharedMemory::operator[] ( unsigned  index  )  [inline]

void StSharedMemory::realloc ( unsigned  size  )  [inline]

Resize the memory

void StSharedMemory::renew (  )  [inline]

Detach from data and get ready to renew the instance

void StSharedMemory::setMemoryPointer ( void *  pointer  )  [inline]

This function is DANGEROUS of you don't know what you're doing. Use only when memory is not allocated.

void StSharedMemory::setMemorySize ( unsigned  size  )  [inline]

This function is DANGEROUS if you don't know what you're doing. Use it only when memory was reallocated outside this class.

void StSharedMemory::unlock (  )  [inline, private]


Member Data Documentation

unsigned* StSharedMemory::instances [private]

unsigned StSharedMemory::memorySize [private]

void* StSharedMemory::pointer [private]


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 21:15:10 2006 for Smart Tools Library by  doxygen 1.4.7