HLIBpro  2.6
MemBlock< T_value > Class Template Reference

Defines a reference countable memory block.

#include <MemBlock.hh>

Inheritance diagram for MemBlock< T_value >:
Matrix< T_value > Vector< T_value >

Public Types

using value_t = T_value
 internal value type
 

Public Member Functions

 MemBlock () noexcept
 ctor with nullptr data and 0 references
 
 MemBlock (const size_t n)
 ctor for n elements of value_t and 0 references
 
 MemBlock (const MemBlock &b)
 copy ctor (copy reference!)
 
 MemBlock (MemBlock &&b) noexcept
 move ctor (move ownership)
 
 ~MemBlock ()
 dtor removing all data even if references exist !
 
MemBlockoperator= (const MemBlock &b)
 copy operator (copy reference!)
 
MemBlockoperator= (MemBlock &&b) noexcept
 move ctor (move ownership)
 
value_tdata () noexcept
 return pointer to internal array
 
const value_tdata () const noexcept
 return const pointer to internal array
 
bool is_owner () const noexcept
 return is_owner status