HLIBpro  2.0
Public Member Functions | List of all members
MemBlock< T > Class Template Reference

Defines a reference countable memory block.

#include <MemBlock.hh>

Inheritance diagram for MemBlock< T >:
NullMemBlock< T >

Public Member Functions

 MemBlock ()
 ctor with NULL data and 0 references
 
 MemBlock (const size_t n)
 ctor for n elements of T and 0 references
 
 ~MemBlock ()
 dtor removing all data even if references exist !
 
T * data ()
 return pointer to internal array
 
const T * data () const
 return const pointer to internal array
 
void add_ref ()
 add reference to memory block
 
bool del_ref ()
 

Member Function Documentation

bool del_ref ( )
inline

remove reference to memory block and return true if no reference is left