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>
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 |
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.
vil_nitf2_field_value< T >::vil_nitf2_field_value | ( | vcl_string | tag | ) | [inline] |
Definition at line 74 of file vil_nitf2_field_functor.h.
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.
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.
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.
vcl_map<T, T> vil_nitf2_field_value< T >::overrides [private] |
Definition at line 99 of file vil_nitf2_field_functor.h.
vcl_string vil_nitf2_field_value< T >::tag [private] |
Definition at line 98 of file vil_nitf2_field_functor.h.