DGtal  0.9.3beta
Public Member Functions | Data Fields
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField Struct Reference

Public Member Functions

 HeaderField (const char *t, const char *v)
 
 ~HeaderField ()
 
 HeaderField (const HeaderField &h)
 
 HeaderField ()
 
const HeaderFieldoperator= (const HeaderField &h)
 

Data Fields

char * type
 
char * value
 

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 147 of file LongvolReader.h.

Constructor & Destructor Documentation

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 149 of file LongvolReader.h.

149  :
150  type( strdup(t) ), value( strdup(v) ) {}
char * type
Type of field (e.g. Voxel-Size)
char * value
Value of field (e.g. 2)
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::~HeaderField ( )
inline

Definition at line 151 of file LongvolReader.h.

151  {
152  free( type );
153  free( value );
154  }
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 156 of file LongvolReader.h.

156  :
157  type( strdup(h.type) ), value( strdup(h.value) ) {};
char * type
Type of field (e.g. Voxel-Size)
char * value
Value of field (e.g. 2)
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::HeaderField ( )
inline

Default constructor.

Definition at line 159 of file LongvolReader.h.

159 : type(NULL), value(NULL) {};
char * type
Type of field (e.g. Voxel-Size)
char * value
Value of field (e.g. 2)

Member Function Documentation

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 161 of file LongvolReader.h.

References DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::type, and DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::value.

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

Field Documentation

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 171 of file LongvolReader.h.

Referenced by DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::operator=().

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 173 of file LongvolReader.h.

Referenced by DGtal::LongvolReader< TImageContainer, TFunctor >::HeaderField::operator=().


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