OpenStructure
Public Types
ValueHolder< V > Class Template Reference

#include <value_holder.hh>

Public Types

typedef V * VPtr
 
typedef const V * ConstVPtr
 
typedef VPtrVPtrPtr
 

Construction, Release, etc

 ValueHolder (const Size &s)
 
 ValueHolder (const Size &s, const Size &ps)
 
 ValueHolder (const ValueHolder< V > &h)
 
ValueHolderoperator= (const ValueHolder< V > &h)
 
 ~ValueHolder ()
 
void Swap (ValueHolder &vh)
 
std::size_t MemSize () const
 
V & Value (const Index &i)
 
const V & Value (const Index &i) const
 
VPtr GetData ()
 
ConstVPtr GetData () const
 
ConstVPtr GetEnd () const
 
static DataType GetDataType ()
 

Detailed Description

template<typename V>
class ost::img::image_state::ValueHolder< V >

Definition at line 62 of file value_holder.hh.

Member Typedef Documentation

◆ ConstVPtr

typedef const V* ConstVPtr

Definition at line 65 of file value_holder.hh.

◆ VPtr

typedef V* VPtr

Definition at line 64 of file value_holder.hh.

◆ VPtrPtr

typedef VPtr* VPtrPtr

Definition at line 66 of file value_holder.hh.

Constructor & Destructor Documentation

◆ ValueHolder() [1/3]

ValueHolder ( const Size s)

initialization with size

◆ ValueHolder() [2/3]

ValueHolder ( const Size s,
const Size ps 
)

initialization with size and physical size

◆ ValueHolder() [3/3]

ValueHolder ( const ValueHolder< V > &  h)

copy ctor provides full copy!

◆ ~ValueHolder()

free allocated memory upon destruction

Member Function Documentation

◆ GetData() [1/2]

VPtr GetData ( )
inline

return pointer to raw data

Definition at line 136 of file value_holder.hh.

◆ GetData() [2/2]

ConstVPtr GetData ( ) const
inline

const version of GetData()

Definition at line 138 of file value_holder.hh.

◆ GetDataType()

static DataType GetDataType ( )
static

◆ GetEnd()

ConstVPtr GetEnd ( ) const
inline

Definition at line 141 of file value_holder.hh.

◆ MemSize()

std::size_t MemSize ( ) const

◆ operator=()

ValueHolder& operator= ( const ValueHolder< V > &  h)

assignement provides full copy!

Not exception safe, ie the state of value holder is undefined if something goes wrong here. This is on purpose to allow memory efficient assignement!

◆ Swap()

void Swap ( ValueHolder< V > &  vh)

swap data with another value holder

◆ Value() [1/2]

V& Value ( const Index i)
inline

return direct r/w access to the value without boundary check

The lookup is based on an integer triplet encapsulated within Index.

Definition at line 108 of file value_holder.hh.

◆ Value() [2/2]

const V& Value ( const Index i) const
inline

return direct ro access to the value without boundary check

The lookup is based on an integer triplet encapsulated within Index.

Definition at line 124 of file value_holder.hh.


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