DGtal  1.4.beta
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField Struct Reference

Public Member Functions

 HeaderField (const char *t, const char *v)
 Constructor. The string are copied. More...
 
 ~HeaderField ()
 
 HeaderField (const HeaderField &h)
 Copy constructor. More...
 
 HeaderField ()
 Default constructor. More...
 
const HeaderFieldoperator= (const HeaderField &h)
 Assignement operator. More...
 

Data Fields

char * type
 Type of field (e.g. Voxel-Size) More...
 
char * value
 Value of field (e.g. 2) More...
 

Detailed Description

template<typename TImageContainer, typename TFunctor = functors::Cast< typename TImageContainer::Value >>
struct DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField

This class help us to associate a field type and his value. An object is a pair (type, value). You can copy and assign such objects.

Definition at line 149 of file LongvolReader.h.

Constructor & Destructor Documentation

◆ HeaderField() [1/3]

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::HeaderField ( const char *  t,
const char *  v 
)
inline

Constructor. The string are copied.

Definition at line 151 of file LongvolReader.h.

151  :
152  type( strdup(t) ), value( strdup(v) ) {}
char * type
Type of field (e.g. Voxel-Size)
char * value
Value of field (e.g. 2)

◆ ~HeaderField()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::~HeaderField ( )
inline

Definition at line 153 of file LongvolReader.h.

153  {
154  free( type );
155  free( value );
156  }

◆ HeaderField() [2/3]

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::HeaderField ( const HeaderField h)
inline

Copy constructor.

Definition at line 158 of file LongvolReader.h.

158  :
159  type( strdup(h.type) ), value( strdup(h.value) ) {};

◆ HeaderField() [3/3]

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::HeaderField ( )
inline

Default constructor.

Definition at line 161 of file LongvolReader.h.

161 : type(NULL), value(NULL) {};

Member Function Documentation

◆ operator=()

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
const HeaderField& DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::operator= ( const HeaderField h)
inline

Assignement operator.

Definition at line 163 of file LongvolReader.h.

163  {
164  free( type );
165  free( value );
166  if (h.type != NULL) {
167  type = strdup( h.type );
168  value = strdup( h.value );
169  }
170  return *this;
171  }

Field Documentation

◆ type

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
char* DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::type

Type of field (e.g. Voxel-Size)

Definition at line 173 of file LongvolReader.h.

◆ value

template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
char* DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::value

Value of field (e.g. 2)

Definition at line 175 of file LongvolReader.h.


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