DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
DGtal::VolReader< 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::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

◆ HeaderField() [1/3]

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

◆ ~HeaderField()

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 }

◆ HeaderField() [2/3]

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) ) {};

◆ HeaderField() [3/3]

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) {};

Member Function Documentation

◆ operator=()

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.

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

◆ type

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.

◆ value

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.


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