Home Libraries Author Links

smartptraids.hpp File Reference


Detailed Description

Declarations of smart pointer aids.

Version:
1.04-r5
Date:
2006-11-30 12:41:44 (demx18a6)
Author:
Tom Michaelis
SysToMath
Wittelsbacherstr. 7
D-80469 Munich
Contact:
http://www.SysToMath.com
mailto:Tom.Michaelis@SysToMath.com
This C++ header file contains the declarations of class templates for smart pointer aids. They are implemented in the C++ inline file smartptrxaids.hpp belonging to the SysToMath Aids C++ Library stmaids.

Definition in file smartptraids.hpp.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  stm
namespace  stm::smartptr

Classes

struct  stm::smartptr::policy< Flags >
 Class template serving as Policy template parameter for class templates injective_ptr and injective_set. More...
struct  stm::smartptr::MakeSurjective< Policy >
 Class template serving as wrapper of template parameter Policy to ensure the surjective policy property. More...
struct  stm::smartptr::MakeMultirange< Policy >
 Class template serving as wrapper of template parameter Policy to ensure the multirange policy property. More...
class  stm::smartptr::injective_ptr< T, Compare, Allocator, Policy >
 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  stm::smartptr::injective_set< T, Compare, Allocator, Policy >
 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  stm::smartptr::injective_set< T, Compare, Allocator, Policy >::accessor
 Subclass of injective_ptr<T, Compare, Allocator, MakeMultirange<Policy> > representing an element of this injective_set object. More...
class  stm::smartptr::injective< T, Compare, Allocator, Policy >
 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  stm::smartptr::bijective< T, Compare, Allocator, Policy >
 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 stm::smartptr::Surjective = 0x00000001
 Surjective policy flag.
const stm::dword stm::smartptr::Multirange = 0x00000002
 Multirange policy flag.

Functions

template<class T, class Compare, class Allocator, class Policy>
bool stm::smartptr::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 stm::smartptr::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 stm::smartptr::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 stm::smartptr::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 * stm::smartptr::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 & stm::smartptr::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).