Classes
core/vil/file_formats/vil_nitf2_field_functor.h File Reference

Functors used by NITF classes. More...

#include <vcl_string.h>
#include <vcl_vector.h>
#include <vcl_map.h>
#include "vil_nitf2_field_sequence.h"

Go to the source code of this file.

Classes

class  vil_nitf2_field_functor< 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. More...
class  vil_nitf2_multiply_field_values
 Functor vil_nitf2_multiply_field_values defines a function that sets its out parameter to the product of the values of two fields. More...
class  vil_nitf2_max_field_value_plus_offset_and_threshold
 Functor vil_nitf2_max_field_value_plus_offset_and_threshold defines a function that sets its out parameter to either the value of a specified field plus an offset, or a specified minimum value, whichever is greater. More...
class  vil_nitf2_field_value_greater_than< T >
 Functor vil_nitf2_field_value_greater_than defines a comparison predicate that sets its out parameter to true if a specified field from a field sequence is found and its value is greater than a specified threshold. More...
class  vil_nitf2_field_specified
 Functor vil_nitf2_field_specified defines a comparison predicate that sets its out parameter to true iff the specified field is not blank. More...
class  vil_nitf2_field_value_one_of< T >
 Functor vil_nitf2_field_value_one_of defines a predicate that sets its out parameter to true iff the value of the specified tag equals one of the elements of a vcl_vector of acceptable values. More...
class  vil_nitf2_choose_field_value< T >
 Functor vil_nitf2_choose_field_value defines a function that sets its out parameter to a value of one of two fields of a field sequence. More...
class  vil_nitf2_constant_functor< T >

Detailed Description

Functors used by NITF classes.

Base class for functors that define a function that takes a vil_nitf2_field_sequence and attempts to compute an "out" parameter of type T. The function also returns a bool that specifies whether the value could be computed.

These functors are used to evaluate NITF field tags and invariably call vil_nitf2_field_sequence::get_value(). When calling this method, please be sure to set the argument ignore_extra_indexes to true. This will allow the functor to be used within a repeat loop and reference any preceding tag, inside or outside the repeat loop. For example, to define a field sequence like this: FIELD A; REPEAT i=1..N FIELD B(i) FIELD C(i) exists if B(i) > 0 FIELD D(i) exists if A > 0 the same conditional functor can be used in the definitions of fields C and D by simply providing the name of the appropriate tag. When the functor is evaluated, the current index (i) is used to fetch the tag. By calling get_value() with ignore_extra_indexes set to true, the value of A can be fetched without causing an error.

Definition in file vil_nitf2_field_functor.h.