Public Types | Private Types
utilmm::smart::uniq_pointer< Ty, Hash, Equal > Struct Template Reference

Unique instance memory pointer definition traits. More...

#include <uniq_pointer.hh>

List of all members.

Public Types

typedef pointer< manager_typetype
 The smart pointer type.

Private Types

typedef ref_count::manager
< mem_type
manager_type
typedef ref_count::uniq_memory
< Ty, Hash, Equal > 
mem_type

Detailed Description

template<typename Ty, class Hash = hash<Ty>, class Equal = std::equal_to<Ty>>
struct utilmm::smart::uniq_pointer< Ty, Hash, Equal >

Unique instance memory pointer definition traits.

This structure is just an helper to have direct access for the unique insatnce memory smart pointer with reference counting management

Parameters:
TyThe type we want to point to
HashA hashing functor for Ty
EqualAn equality functor for Ty

To use a smart pointer to unique memory user just need to declare the type like in following code.

 #include "smart/uniq_pointer.hh"

 // [...]

 utilmm::smart::uniq_pointer<int>::type pi(new int(5)), pj;

 if( *pi==5 )
   pj = pi;
See also:
utilmm::smart::pointer
utilmm::smart::ref_count::manager
utilmm::smart::ref_count::uniq_memory
Author:
Frédéric Py <fpy@laas.fr>

Definition at line 47 of file uniq_pointer.hh.


Member Typedef Documentation

template<typename Ty, class Hash = hash<Ty>, class Equal = std::equal_to<Ty>>
typedef ref_count::manager<mem_type> utilmm::smart::uniq_pointer< Ty, Hash, Equal >::manager_type [private]

Definition at line 50 of file uniq_pointer.hh.

template<typename Ty, class Hash = hash<Ty>, class Equal = std::equal_to<Ty>>
typedef ref_count::uniq_memory<Ty, Hash, Equal> utilmm::smart::uniq_pointer< Ty, Hash, Equal >::mem_type [private]

Definition at line 49 of file uniq_pointer.hh.

template<typename Ty, class Hash = hash<Ty>, class Equal = std::equal_to<Ty>>
typedef pointer<manager_type> utilmm::smart::uniq_pointer< Ty, Hash, Equal >::type

The smart pointer type.

This the type of the smart pointer with unique memory and reference counting management.

Definition at line 58 of file uniq_pointer.hh.


The documentation for this struct was generated from the following file:


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:02