utilmm::smart::ref_count::simple_memory< Ty > Struct Template Reference
[Smart pointersLibrary internal utilities]

simple memory manager for utilmm::smart::ref_count::manager More...

#include <simple_memory.hh>

List of all members.

Public Types

typedef Ty base_type
 Real type for memory cells.
typedef Ty base_type
 Real type for memory cells.
typedef std::pair< base_type,
size_t > 
cell_type
 memory cell type
typedef std::pair< base_type,
size_t > 
cell_type
 memory cell type
typedef cell_typemem_cell
 public memory cell type
typedef cell_typemem_cell
 public memory cell type

Public Member Functions

mem_cell create (base_type *ptr)
 Attachment of a new pointer.
mem_cell create (base_type *ptr)
 Attachment of a new pointer.
void destroy (mem_cell c)
 Destroy a memory cell.
void destroy (mem_cell c)
 Destroy a memory cell.
mem_cell null_cell ()
 null cell creation
mem_cell null_cell ()
 null cell creation

Detailed Description

template<typename Ty>
struct utilmm::smart::ref_count::simple_memory< Ty >

simple memory manager for utilmm::smart::ref_count::manager

This class implements the simplest memory manager we can use for utilmm::smart::ref_count::manager class. This manager will just delete the pointed cell when the manager request for it.

Parameters:
Ty The type of managed cells
Note:
This manager may be buggy as it could create two counter for one pointed cell then it will surely delete twice the pointed cell.
Author:
Frédéric Py <fpy@laas.fr>

Definition at line 30 of file install/include/utilmm/smart/bits/simple_memory.hh.


Member Typedef Documentation

template<typename Ty >
typedef Ty utilmm::smart::ref_count::simple_memory< Ty >::base_type

Real type for memory cells.

Definition at line 32 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
typedef Ty utilmm::smart::ref_count::simple_memory< Ty >::base_type

Real type for memory cells.

Definition at line 32 of file install/include/utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
typedef std::pair<base_type, size_t> utilmm::smart::ref_count::simple_memory< Ty >::cell_type

memory cell type

Definition at line 34 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
typedef std::pair<base_type, size_t> utilmm::smart::ref_count::simple_memory< Ty >::cell_type

memory cell type

Definition at line 34 of file install/include/utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
typedef cell_type* utilmm::smart::ref_count::simple_memory< Ty >::mem_cell

public memory cell type

Definition at line 36 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
typedef cell_type* utilmm::smart::ref_count::simple_memory< Ty >::mem_cell

public memory cell type

Definition at line 36 of file install/include/utilmm/smart/bits/simple_memory.hh.


Member Function Documentation

template<typename Ty >
mem_cell utilmm::smart::ref_count::simple_memory< Ty >::create ( base_type ptr  )  [inline]

Attachment of a new pointer.

This function adds a new pointer to the memory management.

Parameters:
ptr The pointer to manage
Returns:
The cell associated to ptr
Bug:
If the same pointer is passed more than one time to this function there's no control to return a mem_cell with the good reference counter.

Definition at line 61 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
mem_cell utilmm::smart::ref_count::simple_memory< Ty >::create ( base_type ptr  )  [inline]

Attachment of a new pointer.

This function adds a new pointer to the memory management.

Parameters:
ptr The pointer to manage
Returns:
The cell associated to ptr
Bug:
If the same pointer is passed more than one time to this function there's no control to return a mem_cell with the good reference counter.

Definition at line 61 of file install/include/utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
void utilmm::smart::ref_count::simple_memory< Ty >::destroy ( mem_cell  c  )  [inline]

Destroy a memory cell.

This function Will detroy a memory cell and the real pointed value

Parameters:
c The cell to destroy

Definition at line 72 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
void utilmm::smart::ref_count::simple_memory< Ty >::destroy ( mem_cell  c  )  [inline]

Destroy a memory cell.

This function Will detroy a memory cell and the real pointed value

Parameters:
c The cell to destroy

Definition at line 72 of file install/include/utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
mem_cell utilmm::smart::ref_count::simple_memory< Ty >::null_cell (  )  [inline]

null cell creation

This function create the cell corresponding to null

Returns:
the null cell

Definition at line 44 of file utilmm/smart/bits/simple_memory.hh.

template<typename Ty >
mem_cell utilmm::smart::ref_count::simple_memory< Ty >::null_cell (  )  [inline]

null cell creation

This function create the cell corresponding to null

Returns:
the null cell

Definition at line 44 of file install/include/utilmm/smart/bits/simple_memory.hh.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Fri Jan 11 10:07:43 2013