DGtal  0.9.4beta
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 128 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 130 of file VolReader.h.

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

Definition at line 132 of file VolReader.h.

132  {
133  free( type );
134  free( value );
135  }
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 137 of file VolReader.h.

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

Default constructor.

Definition at line 140 of file VolReader.h.

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

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 142 of file VolReader.h.

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

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

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 152 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 154 of file VolReader.h.

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


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