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

MangoPtr Namespace Reference


Detailed Description

Namespace containing all Mango-ptr classes and functions.

See also:
MangoPtrNamespaceAlias.hh


Compounds

class  BLink
 A "Better Link", a kind of pointer that can be validated. More...

class  BLinkable
 Derive from this class to make your subclass a BLink'able object. More...

struct  BLinkable< ForOwnedBy::Wrapper >
 Owned objects (containers and pointers) inherit from this specialization just to make obvious the fact that they can be used with BLink. More...

class  CheckedPtr
 Proxy class that stands for a pointer. More...

struct  CntrCleaner
 Class that implements an adaptable container cleaner. More...

struct  CntrCleaner< T * >
 Specialization to handle pure pointers. More...

struct  CntrCleaner< T *const >
 Specialization to handle pure const pointers. More...

struct  CntrCloner
 Generic cloner class for objects of type Container. More...

struct  CntrCloner< T * >
 Partial specialization to deep-copy pointers, uses new(). More...

struct  CntrCloner< Owned< T, OStrict > * >
 Specialization for pointers to Owned objects, in case of nested Owned containers. More...

struct  CntrClonerSorted
 CntrCloner that works for sorted containers. More...

class  ObjSharing
 Policy implementor for strict ownership and shared usage. More...

class  ObjSharing< OShared >
 Policy implementor for shared ownership and shared usage. More...

class  Owned
 Owned container of pointers. More...

class  Owned< CntrType &, OShared >
 Shared owned container of pointers. More...

class  Owned< OType *, oshiptype >
 An owned pointer, aka "an owner". More...

class  Ownership
 Transaction object that represents the ownership of an object on the heap. More...

class  SharedValidity
 A validator that can be shared (by several (objects, functions, etc). More...

struct  CntrCleaner< std::pair< T, U > >
 Specialization to handle pairs and maps etc. More...

struct  CntrCloner< std::map< T *, U, V, W > >
 Specialization for std::map. More...

struct  CntrCloner< std::multimap< T *, U, V, W > >
 Specialization for std::multimap. More...

struct  CntrCleaner< std::queue< T, U > >
 Specialization to handle std::queue. More...

struct  CntrCloner< std::set< T *, U, V > >
 Specialization for std::set. More...

struct  CntrCloner< std::multiset< T *, U, V > >
 Specialization for std::multiset. More...

struct  CntrCleaner< std::stack< T, U > >
 Specialization to handle std::stack. More...

class  ValidityChecker
 Open part of the protected interface of SharedValidity so that checking the validatity state can be done. More...

class  ValidityOwner
 Open part of the protected interface of SharedValidity so that ownership ops can be used. More...


Enumerations

enum  OwnershipType { OStrict, OShared }
 Second template parameter to Owned<T,U> should be one of these enumerations. More...


Functions

template<typename T> bool isNull (T *p)
 Test if a pointer is null.

template<typename T> bool isNotNull (T *p)
 Test if a pointer is not null.

template<typename T> void nullify (T *&p)
 Set a pointer to null.


Variables

const int NullPtr = 0
 Replace NULL with a non-macro. Use this instead of NULL.


Enumeration Type Documentation

enum MangoPtr::OwnershipType
 

Second template parameter to Owned<T,U> should be one of these enumerations.

Enumeration values:
OStrict  Strict ownership: one owner only, many users.
OShared  Shared ownership: many owners, many users.

Definition at line 29 of file OwnershipTypes.hh.


Function Documentation

template<typename T>
bool isNull T *    p [inline]
 

Test if a pointer is null.

Use this instead of comparing to NULL.

Returns:
true if pointer == 0.

Definition at line 35 of file nullness.hh.

Referenced by MangoPtr::SharedValidity::isShared(), MangoPtr::Owned< OType *, oshiptype >::Owned(), MangoPtr::SharedValidity::setValid(), and MangoPtr::Owned< OType *, oshiptype >::takeOwnership().

template<typename T>
bool isNotNull T *    p [inline]
 

Test if a pointer is not null.

Use this instead of comparing to NULL.

Returns:
true if pointer != 0.

Definition at line 43 of file nullness.hh.

Referenced by MangoPtr::Owned< OType *, oshiptype >::operator const Owned(), MangoPtr::SharedValidity::operator=(), MangoPtr::SharedValidity::reset(), MangoPtr::SharedValidity::SharedValidity(), and MangoPtr::Owned< OType *, oshiptype >::swap().

template<typename T>
void nullify T *&    p [inline]
 

Set a pointer to null.

Use this instead of ptr=0 since clearer that ptr is a pointer rather than an integer, plus it is greppable.

Parameters:
p  the pointer to nullify

Definition at line 52 of file nullness.hh.

Referenced by MangoPtr::SharedValidity::reset(), and MangoPtr::Owned< OType *, oshiptype >::takeOwnership().


Generated on Tue Nov 12 20:44:01 2002 for Mango-ptr Library by doxygen1.2.18