DGtal  0.9.4beta
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 154 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 156 of file LongvolReader.h.

156  :
157  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 158 of file LongvolReader.h.

158  {
159  free( type );
160  free( value );
161  }
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 163 of file LongvolReader.h.

163  :
164  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 166 of file LongvolReader.h.

166 : 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 168 of file LongvolReader.h.

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

168  {
169  free( type );
170  free( value );
171  if (h.type != NULL) {
172  type = strdup( h.type );
173  value = strdup( h.value );
174  }
175  return *this;
176  }

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

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


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