Reference counting management. More...
#include <ref_count_manager.hh>
Public Types | |
typedef Memory::base_type | base_type |
public type of pointed cells | |
typedef Memory::base_type | base_type |
public type of pointed cells | |
typedef Memory::mem_cell | mem_cell |
real type of pointed cells | |
typedef Memory::mem_cell | mem_cell |
real type of pointed cells | |
Public Member Functions | |
mem_cell | assign (mem_cell c) |
Assignment of a cell. | |
mem_cell | assign (mem_cell c) |
Assignment of a cell. | |
base_type * | get_ptr (mem_cell c) |
real pointer value. | |
base_type * | get_ptr (mem_cell c) |
real pointer value. | |
mem_cell | manage (base_type *ptr) |
Add new pointer in management. | |
mem_cell | manage (base_type *ptr) |
Add new pointer in management. | |
bool | null (mem_cell c) |
Check if null. | |
bool | null (mem_cell c) |
Check if null. | |
void | release (mem_cell c) |
Unassignement of a cell. | |
void | release (mem_cell c) |
Unassignement of a cell. | |
Private Member Functions | |
manager () | |
manager () | |
~manager () | |
~manager () | |
Private Attributes | |
Memory | mem |
Friends | |
class | singleton::wrapper |
Reference counting management.
Memory | a model for the memory |
This class is a manager for smart::pointer
that control the life time policy of memory cells managed by Memory
utilmm::smart::simple_memory
is a quite simple and illustrative model for Memory Definition at line 26 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
typedef Memory::base_type utilmm::smart::ref_count::manager< Memory >::base_type |
public type of pointed cells
Definition at line 38 of file utilmm/smart/bits/ref_count_manager.hh.
typedef Memory::base_type utilmm::smart::ref_count::manager< Memory >::base_type |
public type of pointed cells
Definition at line 11 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
typedef Memory::mem_cell utilmm::smart::ref_count::manager< Memory >::mem_cell |
real type of pointed cells
This type will store all the information of the reference counter it may be compatible with the std::pair<base_type,size_t>*
type.
Definition at line 45 of file utilmm/smart/bits/ref_count_manager.hh.
typedef Memory::mem_cell utilmm::smart::ref_count::manager< Memory >::mem_cell |
real type of pointed cells
This type will store all the information of the reference counter it may be compatible with the std::pair<base_type,size_t>*
type.
Definition at line 18 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
utilmm::smart::ref_count::manager< Memory >::manager | ( | ) | [inline, private] |
Definition at line 81 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
utilmm::smart::ref_count::manager< Memory >::~manager | ( | ) | [inline, private] |
Definition at line 83 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
utilmm::smart::ref_count::manager< Memory >::manager | ( | ) | [inline, private] |
Definition at line 108 of file utilmm/smart/bits/ref_count_manager.hh.
utilmm::smart::ref_count::manager< Memory >::~manager | ( | ) | [inline, private] |
Definition at line 110 of file utilmm/smart/bits/ref_count_manager.hh.
mem_cell utilmm::smart::ref_count::manager< Memory >::assign | ( | mem_cell | c | ) |
Assignment of a cell.
This function is called by utilmm::smart::pointer
to indicate to the manager that a given cell is assigned to a new pointer.
c | The cell assigned |
mem_cell utilmm::smart::ref_count::manager< Memory >::assign | ( | mem_cell | c | ) |
Assignment of a cell.
This function is called by utilmm::smart::pointer
to indicate to the manager that a given cell is assigned to a new pointer.
c | The cell assigned |
base_type* utilmm::smart::ref_count::manager< Memory >::get_ptr | ( | mem_cell | c | ) | [inline] |
real pointer value.
This function give an access to the real pointer value of a given cell.
c | The cell |
Definition at line 103 of file utilmm/smart/bits/ref_count_manager.hh.
base_type* utilmm::smart::ref_count::manager< Memory >::get_ptr | ( | mem_cell | c | ) | [inline] |
real pointer value.
This function give an access to the real pointer value of a given cell.
c | The cell |
Definition at line 76 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
mem_cell utilmm::smart::ref_count::manager< Memory >::manage | ( | base_type * | ptr | ) |
Add new pointer in management.
ptr | The pointer to manage |
This function is called by smart::pointer
when this one wants to add a new pointer to the manager management.
mem_cell utilmm::smart::ref_count::manager< Memory >::manage | ( | base_type * | ptr | ) |
Add new pointer in management.
ptr | The pointer to manage |
This function is called by smart::pointer
when this one wants to add a new pointer to the manager management.
bool utilmm::smart::ref_count::manager< Memory >::null | ( | mem_cell | c | ) | [inline] |
Check if null.
Check if a given cell points to nothing
c | The cell to check |
true | if c is null | |
false | else |
Definition at line 90 of file utilmm/smart/bits/ref_count_manager.hh.
bool utilmm::smart::ref_count::manager< Memory >::null | ( | mem_cell | c | ) | [inline] |
Check if null.
Check if a given cell points to nothing
c | The cell to check |
true | if c is null | |
false | else |
Definition at line 63 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
void utilmm::smart::ref_count::manager< Memory >::release | ( | mem_cell | c | ) |
Unassignement of a cell.
This function is called by utilmm::smart::pointer
to indicate that a pointer has stopped to used a given cell.
c | The cell released |
void utilmm::smart::ref_count::manager< Memory >::release | ( | mem_cell | c | ) |
Unassignement of a cell.
This function is called by utilmm::smart::pointer
to indicate that a pointer has stopped to used a given cell.
c | The cell released |
singleton::wrapper [friend] |
Definition at line 88 of file install/include/utilmm/smart/bits/ref_count_manager.hh.
Memory utilmm::smart::ref_count::manager< Memory >::mem [private] |
Definition at line 85 of file install/include/utilmm/smart/bits/ref_count_manager.hh.