DGtal  0.9.3beta
Public Member Functions | Data Fields
DGtal::VolReader< 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::VolReader< 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 129 of file VolReader.h.

Constructor & Destructor Documentation

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

Constructor. The string are copied.

Definition at line 131 of file VolReader.h.

131  :
132  type( strdup(t) ), value( strdup(v) ) {}
char * type
Type of field (e.g. Voxel-Size)
Definition: VolReader.h:153
char * value
Value of field (e.g. 2)
Definition: VolReader.h:155
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::VolReader< TImageContainer, TFunctor >::HeaderField::~HeaderField ( )
inline

Definition at line 133 of file VolReader.h.

133  {
134  free( type );
135  free( value );
136  }
template<typename TImageContainer , typename TFunctor = functors::Cast< typename TImageContainer::Value >>
DGtal::VolReader< TImageContainer, TFunctor >::HeaderField::HeaderField ( const HeaderField h)
inline

Copy constructor.

Definition at line 138 of file VolReader.h.

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

Default constructor.

Definition at line 141 of file VolReader.h.

141 : type(NULL), value(NULL) {};
char * type
Type of field (e.g. Voxel-Size)
Definition: VolReader.h:153
char * value
Value of field (e.g. 2)
Definition: VolReader.h:155

Member Function Documentation

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

Assignement operator.

Definition at line 143 of file VolReader.h.

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

143  {
144  free( type );
145  free( value );
146  if (h.type != NULL) {
147  type = strdup( h.type );
148  value = strdup( h.value );
149  }
150  return *this;
151  }

Field Documentation

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

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

Definition at line 153 of file VolReader.h.

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

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

Value of field (e.g. 2)

Definition at line 155 of file VolReader.h.

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


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