xvr2::Memory Class Reference

#include <Memory.h>

Inheritance diagram for xvr2::Memory:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class implement basic memory management tasks.

Todo:
See if there is really a need for this class.

Definition at line 23 of file Memory.h.


Public Member Functions

 Memory ()
 Calling this will initialize some vital internal variables and cleanup processes.
 ~Memory ()
virtual const char * getClassName ()
 Returns the name of the current class.
virtual std::string toString ()

Static Public Member Functions

static void * allocBuffer (UInt32 size)
 Using this will allocate size bytes in memory.
static Buffer alloc (UInt32 size)
static void * reallocBuffer (void *buf, UInt32 newsize)
 Use this method to enlarge or minimize a buffer.
static void freeBuffer (void **buf)
 Using this will deallocate the memory used by the buffer buf, call this method to deallocate memory allocated by allocBuffer.
static void clearBuffer (void *buf, UInt32 siz, UInt8 value=0)
 Use this method to clear or set every byte in a buffer to a specific value.
static void * duplicate (const void *buf, UInt32 siz)
 This allocate a buffer of size siz and will copy everything in buf to make an exact copy on the newly created buffer.
static void copy (void *destination, const void *source, UInt32 siz)
 This will copy the contents of source and will put them into destination.
static void usleep (UInt32 usec)
 This will return how many CPUs are installed in the system.
static void debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)
 Will print a debug message to the screen.
static void debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__)

Protected Attributes

std::string __cls_name

Friends

std::ostream & operator<< (std::ostream &stream, const Object &s)

Constructor & Destructor Documentation

xvr2::Memory::Memory (  ) 

Calling this will initialize some vital internal variables and cleanup processes.

xvr2::Memory::~Memory (  ) 


Member Function Documentation

static void* xvr2::Memory::allocBuffer ( UInt32  size  )  [static]

Using this will allocate size bytes in memory.

static Buffer xvr2::Memory::alloc ( UInt32  size  )  [static]

static void* xvr2::Memory::reallocBuffer ( void *  buf,
UInt32  newsize 
) [static]

Use this method to enlarge or minimize a buffer.

static void xvr2::Memory::freeBuffer ( void **  buf  )  [static]

Using this will deallocate the memory used by the buffer buf, call this method to deallocate memory allocated by allocBuffer.

static void xvr2::Memory::clearBuffer ( void *  buf,
UInt32  siz,
UInt8  value = 0 
) [static]

Use this method to clear or set every byte in a buffer to a specific value.

static void* xvr2::Memory::duplicate ( const void *  buf,
UInt32  siz 
) [static]

This allocate a buffer of size siz and will copy everything in buf to make an exact copy on the newly created buffer.

static void xvr2::Memory::copy ( void *  destination,
const void *  source,
UInt32  siz 
) [static]

This will copy the contents of source and will put them into destination.

static void xvr2::System::usleep ( UInt32  usec  )  [static, inherited]

This will return how many CPUs are installed in the system.

This will return the CPU speed in megahertz Will return the total amount of system memory Will return the total amount of free system memory Will freeze the software for usec microseconds

virtual const char* xvr2::Object::getClassName (  )  [virtual, inherited]

Returns the name of the current class.

static void xvr2::Object::debugmsg ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

Will print a debug message to the screen.

static void xvr2::Object::debugmsgln ( Object obj,
const char *  msg,
int  linenumber = __LINE__,
const char *  srcfile = __FILE__ 
) [static, inherited]

virtual std::string xvr2::Object::toString (  )  [virtual, inherited]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const Object s 
) [friend, inherited]


Member Data Documentation

std::string xvr2::Object::__cls_name [protected, inherited]

Definition at line 30 of file Object.h.


The documentation for this class was generated from the following file:

Generated on Fri Jun 20 22:55:55 2008 for X-VR2 SDK by  doxygen 1.5.5