Public Member Functions | Private Attributes
vil_nitf2_field_value< T > Class Template Reference

Functor vil_nitf2_field_value defines a function that sets its out parameter to a value of a field from a field sequence. More...

#include <vil_nitf2_field_functor.h>

Inheritance diagram for vil_nitf2_field_value< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vil_nitf2_field_value (vcl_string tag)
 vil_nitf2_field_value (vcl_string tag, vcl_map< T, T > overrideMap)
virtual
vil_nitf2_field_functor< T > * 
copy () const
bool operator() (vil_nitf2_field_sequence *record, const vil_nitf2_index_vector &indexes, T &value)

Private Attributes

vcl_string tag
vcl_map< T, T > overrides

Detailed Description

template<typename T>
class vil_nitf2_field_value< T >

Functor vil_nitf2_field_value defines a function that sets its out parameter to a value of a field from a field sequence.

The function returns whether the field was found. The functor is instantiated with the field's tag. The field sequence is passed to the function.

You can override any value by specifying an overrideMap. For example, if 0 was a special value that actually meant 1 but all other values (2, 3, 4...) actually meant when they were you could get that effect like this: vcl_map< int, int > overrides; overrides.insert( vcl_make_pair( 0, 1 ) ); new vil_nitf2_field_value( "FIELD_NAME", overrides );

Definition at line 71 of file vil_nitf2_field_functor.h.


Constructor & Destructor Documentation

template<typename T >
vil_nitf2_field_value< T >::vil_nitf2_field_value ( vcl_string  tag) [inline]

Definition at line 74 of file vil_nitf2_field_functor.h.

template<typename T >
vil_nitf2_field_value< T >::vil_nitf2_field_value ( vcl_string  tag,
vcl_map< T, T >  overrideMap 
) [inline]

Definition at line 76 of file vil_nitf2_field_functor.h.


Member Function Documentation

template<typename T >
virtual vil_nitf2_field_functor<T>* vil_nitf2_field_value< T >::copy ( ) const [inline, virtual]

Implements vil_nitf2_field_functor< T >.

Definition at line 79 of file vil_nitf2_field_functor.h.

template<typename T >
bool vil_nitf2_field_value< T >::operator() ( vil_nitf2_field_sequence record,
const vil_nitf2_index_vector indexes,
T &  value 
) [inline, virtual]

Implements vil_nitf2_field_functor< T >.

Definition at line 82 of file vil_nitf2_field_functor.h.


Member Data Documentation

template<typename T >
vcl_map<T, T> vil_nitf2_field_value< T >::overrides [private]

Definition at line 99 of file vil_nitf2_field_functor.h.

template<typename T >
vcl_string vil_nitf2_field_value< T >::tag [private]

Definition at line 98 of file vil_nitf2_field_functor.h.


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