zeus::TSharedMemoryObject< T > Class Template Reference

#include <SharedMemoryObject.hpp>

Inheritance diagram for zeus::TSharedMemoryObject< T >:

zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TSharedMemoryObject (const TString &rstrName)
 TSharedMemoryObject (const TString &rstrName, const T &rData)
bool available () const
void clean ()
T * getData ()
const T * getData () const
void setData (const T &rData)

Protected Member Functions

virtual ~TSharedMemoryObject ()

Classes

struct  TypeMemory


Detailed Description

template<class T>
class zeus::TSharedMemoryObject< T >

This class implements a pointer of the shared memory. This pointer is accessible by different processes using a the object name.

Constructor & Destructor Documentation

template<class T>
zeus::TSharedMemoryObject< T >::TSharedMemoryObject ( const TString rstrName  )  [inline]

Creates a shared memory object

Parameters:
rstrName : Name of the shared memory object

template<class T>
zeus::TSharedMemoryObject< T >::TSharedMemoryObject ( const TString rstrName,
const T &  rData 
) [inline]

Creates a shared memory object

Parameters:
rstrName : Name of the shared memory object
rData : Data to copy to the shared memory. Note that all pointers of the T type are just copied as they are. The data behind won't be accessible by other processes

template<class T>
zeus::TSharedMemoryObject< T >::~TSharedMemoryObject (  )  [inline, protected, virtual]

Destroys the shared memory object


Member Function Documentation

template<class T>
bool zeus::TSharedMemoryObject< T >::available (  )  const [inline]

Checks if the shared memory is available

Return values:
true : Memory is available
false,: Memory is not available

template<class T>
void zeus::TSharedMemoryObject< T >::clean (  )  [inline]

cleans the shared memory

template<class T>
T * zeus::TSharedMemoryObject< T >::getData (  )  [inline]

Retruns the data pointer

Return values:
Pointer : data pointer
NULL : Shared memory is not available

template<class T>
const T * zeus::TSharedMemoryObject< T >::getData (  )  const [inline]

Retruns the data pointer

Return values:
Pointer : data pointer
NULL : Shared memory is not available

template<class T>
void zeus::TSharedMemoryObject< T >::setData ( const T &  rData  )  [inline]

copies new data to the shared memory object


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:35 2009