Share::DefaultRefCounter Class Reference
[Internal library classes]

Reference counter for shared segment. More...

#include <DefaultRefCounter.h>

List of all members.

Public Member Functions

 DefaultRefCounter () throw (ShareException)
 ~DefaultRefCounter ()
void notifyAttach ()
void notifyDetach ()
int refCount () const
void unlink ()
bool isUnlinked () const
bool shouldBeDestroyed () const


Detailed Description

Reference counter for shared segment.

Note:
This class can be replaced with more efficient class with equivalet interface by changing Share::TSegmentRefCounter

Definition at line 21 of file DefaultRefCounter.h.


Constructor & Destructor Documentation

Share::DefaultRefCounter::DefaultRefCounter (  )  throw (ShareException)

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

Share::DefaultRefCounter::~DefaultRefCounter (  ) 


Member Function Documentation

void Share::DefaultRefCounter::notifyAttach (  ) 

Client attach notification. This increase reference count.

void Share::DefaultRefCounter::notifyDetach (  ) 

Client detach notification. This decrease reference count.

int Share::DefaultRefCounter::refCount (  )  const

Returns:
Return current count of references.

void Share::DefaultRefCounter::unlink (  ) 

Mark segment to be destroyed.

bool Share::DefaultRefCounter::isUnlinked (  )  const

Returns:
Return true if segment is marked to be destroyed.

bool Share::DefaultRefCounter::shouldBeDestroyed (  )  const

Returns:
Return true if segment should be destroyed. This means, segment is unlinked and references count is zero.


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