Home Libraries Author Links

stm::smartptr Namespace Reference
[SmartptrAids: Smart Pointer Aids]


Detailed Description

Namespace for all smart pointer aids class templates.


Classes

struct  policy
 Class template serving as Policy template parameter for class templates injective_ptr and injective_set. More...
struct  MakeSurjective
 Class template serving as wrapper of template parameter Policy to ensure the surjective policy property. More...
struct  MakeMultirange
 Class template serving as wrapper of template parameter Policy to ensure the multirange policy property. More...
class  injective_ptr
 The class template injective_ptr is a smart pointer pointing to unique constant objects of element type T stored using a static repository. More...
class  injective_set
 The class template injective_set is a container of unique constant objects of value type T stored wrapping a specific range of the static repository of an injective_ptr<T, Compare, Allocator, Policy> object. More...
class  injective
 The traits class template injective combines the class template injective_ptr and its associated class template injective_set having either the surjective or the not surjective policy property. More...
class  bijective
 The traits class template bijective combines the class template injective_ptr and its associated class template injective_set having the surjective policy property. More...

Policy Flags

The policy flag bits are bitwise orable.

const stm::dword Surjective = 0x00000001
 Surjective policy flag.
const stm::dword Multirange = 0x00000002
 Multirange policy flag.

Functions

template<class T, class Compare, class Allocator, class Policy>
bool operator== (const injective_ptr< T, Compare, Allocator, Policy > &ptr1, const injective_ptr< T, Compare, Allocator, Policy > &ptr2)
 Returns true, if both ptr1 and ptr2 are empty or ptr1 and ptr2 are not empty and point to elements being equivalent under the equivalence relation induced by Compare, else false.
template<class T, class Compare, class Allocator, class Policy>
bool operator!= (const injective_ptr< T, Compare, Allocator, Policy > &ptr1, const injective_ptr< T, Compare, Allocator, Policy > &ptr2)
 Returns true, if either ptr1 or ptr2 is not empty and ptr1 or ptr2 is empty or else point to elements being non-equivalent under the equivalence relation induced by Compare, else false.
template<class T, class Compare, class Allocator, class Policy>
bool operator< (const injective_ptr< T, Compare, Allocator, Policy > &ptr1, const injective_ptr< T, Compare, Allocator, Policy > &ptr2)
 Returns a bool value such that operator< is a strict weak ordering as decribed in (25.3) and that under the equivalence relation.
template<class T, class Compare, class Allocator, class Policy>
void swap (injective_ptr< T, Compare, Allocator, Policy > &ptr1, injective_ptr< T, Compare, Allocator, Policy > &ptr2)
 Exchanges the contents of the injective_ptr objects ptr1 and ptr2.
template<class T, class Compare, class Allocator, class Policy>
const T * get_pointer (const injective_ptr< T, Compare, Allocator, Policy > &ptr)
 Returns a constant pointer to the element pointed to by the injective_ptr object ptr, if ptr is not be empty, else the null pointer.
template<class OStreamT, class T, class Compare, class Allocator, class Policy>
OStreamT & operator<< (OStreamT &os, const injective_ptr< T, Compare, Allocator, Policy > &ptr)
 Inserts a string representation of the address of the element pointed to by ptr into the output stream os.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).