Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MangoPtr::ObjSharing< oshiptype > Class Template Reference

#include <ObjSharing.hh>

Inheritance diagram for MangoPtr::ObjSharing< oshiptype >:

Inheritance graph
Collaboration diagram for MangoPtr::ObjSharing< oshiptype >:

Collaboration graph
List of all members.

Detailed Description

template<OwnershipType oshiptype>
class MangoPtr::ObjSharing< oshiptype >

Policy implementor for strict ownership and shared usage.

The shared ownership policy is encapsulated by the template specialization for OwnershipType==OShared. Strict ownership is simple, several methods return hard-coded values, or simply forward the call to the base class.

Definition at line 37 of file ObjSharing.hh.

Public Methods

 ObjSharing ()
 Default does nothing special.

void swap (ObjSharing &rhs)
 swap two strict owners

ObjSharing & operator() (void *optr)
 is object pointed to (optr) valid? call this to set usage sharing state from value of optr

bool destructNeedsDelete (void *optr) const
 Does pointer need deleting? If ownership sharing policy is strict, pointer can always be deleted.

size_t getCountOwned () const
 get how many owners are sharing ownership

size_t getCountUser () const
 get how many users are sharing usage

The documentation for this class was generated from the following file:
Generated on Tue Nov 12 20:44:02 2002 for Mango-ptr Library by doxygen1.2.18