Share::SharedObject Class Reference
[Core library classes]

Shareable object base class. More...

#include <sharelib.h>

Inheritance diagram for Share::SharedObject:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

static void * operator new (size_t size) throw (ShareException)
static void * operator new[] (size_t size) throw (ShareException)
static void operator delete (void *addr, size_t) throw ()
static void operator delete[] (void *addr, size_t) throw ()
static void * alloc (size_t size) throw (ShareException)
static void * alloc (size_t size, size_t count) throw (ShareException)
static void free (void *addr) throw ()

Protected Member Functions

 SharedObject ()
 This is base class only and could not be instantiated direct.
 ~SharedObject ()
 This is base class only and could not be deleted direct.

Detailed Description

Shareable object base class.

It overload operators new and delete for derived class.

Definition at line 346 of file sharelib.h.


Constructor & Destructor Documentation

Share::SharedObject::SharedObject (  )  [inline, protected]

This is base class only and could not be instantiated direct.

Definition at line 413 of file sharelib.h.

Share::SharedObject::~SharedObject (  )  [inline, protected]

This is base class only and could not be deleted direct.

Definition at line 414 of file sharelib.h.


Member Function Documentation

static void* Share::SharedObject::operator new ( size_t  size  )  throw (ShareException) [inline, static]

Overloaded operator new

Exceptions:
ShareException Library-specific exception derived from std::bad_alloc

Definition at line 352 of file sharelib.h.

References alloc().

static void* Share::SharedObject::operator new[] ( size_t  size  )  throw (ShareException) [inline, static]

Overloaded operator new[]

Exceptions:
ShareException Library-specific exception derived from std::bad_alloc

Definition at line 361 of file sharelib.h.

References alloc().

static void Share::SharedObject::operator delete ( void *  addr,
size_t   
) throw () [inline, static]

Overloaded opeartor delete

Definition at line 369 of file sharelib.h.

References free().

static void Share::SharedObject::operator delete[] ( void *  addr,
size_t   
) throw () [inline, static]

Overloaded operator delete[]

Definition at line 377 of file sharelib.h.

References free().

static void* Share::SharedObject::alloc ( size_t  size  )  throw (ShareException) [inline, static]

Allocate block of memory inside shared segment.

Parameters:
size Desired size of block to allocate.
Returns:
Return local address of allocated block on success.
Exceptions:
ShareException Library-specific exception derived from std::bad_alloc

Definition at line 388 of file sharelib.h.

References Share::ShareManager::instance().

Referenced by alloc(), operator new(), and operator new[]().

static void* Share::SharedObject::alloc ( size_t  size,
size_t  count 
) throw (ShareException) [inline, static]

Allocate block of memory inside shared segment.

Parameters:
size Desired size of block to allocate.
Returns:
Return local address of allocated block on success.
Exceptions:
ShareException Library-specific exception derived from std::bad_alloc
Parameters:
count Objects count to allocate.
Note:
Used for STL allocator.

Definition at line 398 of file sharelib.h.

References alloc().

static void Share::SharedObject::free ( void *  addr  )  throw () [inline, static]

Free block of memory previously allocated by alloc() method.

Parameters:
addr Address of block returned by alloc() method.
Attention:
All attached application may crash if this method is called with invalid address as parameter

Definition at line 407 of file sharelib.h.

References Share::ShareManager::instance().

Referenced by operator delete(), and operator delete[]().


The documentation for this class was generated from the following file:
Generated on Sun Aug 26 17:43:03 2007 for ShareLibrary by  doxygen 1.5.2