Share::SharedSegment Class Reference
[Internal library classes]

Platform independent shared segment representation. More...

#include <SharedSegment.h>

List of all members.

Public Member Functions

 SharedSegment (const char *name, size_t size) throw (ShareException)
 Create and attach new shared segment with given name and size.
 SharedSegment (const char *name) throw (ShareException)
 Attach to already existing shared segment.
 ~SharedSegment () throw ()
 Detach from shared segment.
const char * name () const
 
Returns:
Return name of shared segment.

void * atAddress () const
 
Returns:
Return attached shared segment address.

void destroy ()
 Destroy shared segment.


Detailed Description

Platform independent shared segment representation.

Note:
Implementation of this class was taken from MSDTk.

Definition at line 36 of file SharedSegment.h.


Constructor & Destructor Documentation

Share::SharedSegment::SharedSegment ( const char *  name,
size_t  size 
) throw (ShareException)

Create and attach new shared segment with given name and size.

If segment with given name already exists, ShareException is thrown.

Parameters:
name Name of segment created.
size Size of segment created. This size is fixed in this version of library.
Exceptions:
ShareException Library-specific exception derived from std::bad_alloc

Share::SharedSegment::SharedSegment ( const char *  name  )  throw (ShareException)

Attach to already existing shared segment.

If segment with given name does not exists, ShareException is thrown.

Parameters:
name Name of shared segment to attach to.
Exceptions:
ShareException Library-specific exception derived from std::bad_alloc

Share::SharedSegment::~SharedSegment (  )  throw ()

Detach from shared segment.


Member Function Documentation

const char* Share::SharedSegment::name (  )  const [inline]

Returns:
Return name of shared segment.

Definition at line 64 of file SharedSegment.h.

void* Share::SharedSegment::atAddress (  )  const [inline]

Returns:
Return attached shared segment address.

Definition at line 69 of file SharedSegment.h.

void Share::SharedSegment::destroy (  ) 

Destroy shared segment.

Attention:
On Win32 platform is segment destoroyed automatically by OS, when there are no more references to segment.


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