Typed concrete class for array fields. More...
#include <vil_nitf2_typed_array_field.h>

Public Member Functions | |
| vil_nitf2_typed_array_field (int num_dimensions, vil_nitf2_field_definition *field_definition) | |
| bool | value (const vil_nitf2_index_vector &indexes, T &out_value) const override |
| Set out_value to the scalar value at the specified index vector, and returns whether specified element was defined. More... | |
| bool | read_vector_element (vil_nitf2_istream &input, const vil_nitf2_index_vector &indexes, int variable_width) override |
| Reads from input stream the scalar value at specified index. More... | |
| bool | write_vector_element (vil_nitf2_ostream &output, const vil_nitf2_index_vector &indexes, int variable_width) const override |
| Writes to output stream the scalar value at specified index. More... | |
| std::ostream & | output (std::ostream &os) const override |
| Output in human-readable form. More... | |
| ~vil_nitf2_typed_array_field () override | |
| Destructor (overridden below for instantiations where T is a pointer). More... | |
| template<> | |
| ~vil_nitf2_typed_array_field () | |
| template<> | |
| ~vil_nitf2_typed_array_field () | |
| int | num_dimensions () const override |
| Number of dimensions. More... | |
| void | set_next_dimension (const vil_nitf2_index_vector &indexes, int bound) |
| Given a partial index vector, set the value of the next dimension. More... | |
| int | next_dimension (const vil_nitf2_index_vector &indexes) const |
| Given a partial index vector, return value of next dimension (or zero if none). More... | |
| bool | check_index (const vil_nitf2_index_vector &indexes) const |
| Compares index vector against value dimensions. More... | |
| field_tree * | get_tree () const override |
| virtual bool | value (const vil_nitf2_index_vector &, int &) const |
| Sets out_value to the value of the element selected by specified index vector, which must satisfy check_index(). More... | |
| virtual bool | value (const vil_nitf2_index_vector &, double &) const |
| virtual bool | value (const vil_nitf2_index_vector &, char &) const |
| virtual bool | value (const vil_nitf2_index_vector &, void *&) const |
| virtual bool | value (const vil_nitf2_index_vector &, std::string &) const |
| virtual bool | value (const vil_nitf2_index_vector &, vil_nitf2_location *&) const |
| virtual bool | value (const vil_nitf2_index_vector &, vil_nitf2_date_time &) const |
| virtual bool | value (const vil_nitf2_index_vector &, vil_nitf2_tagged_record_sequence &) const |
| std::string | tag () const |
| std::string | pretty_name () const |
| std::string | description () const |
| vil_nitf2_scalar_field * | scalar_field () |
| vil_nitf2_array_field * | array_field () |
| vil_nitf2::enum_field_type | type () const |
Protected Member Functions | |
| void | output_dimension_iterate (std::ostream &os, vil_nitf2_index_vector indexes, bool &output_yet) const |
| void | do_dimension (const vil_nitf2_index_vector &index, vil_nitf2_field::field_tree *tr) const |
| std::string | get_value_string (const vil_nitf2_index_vector &in_indices) const |
Protected Attributes | |
| int | m_num_dimensions |
| Dimensionality of vector field. More... | |
| std::map< vil_nitf2_index_vector, int > | m_dimensions_map |
| Because a repeating field's dimension can depend on the value of another repeating field, slices of a multi-dimensional vector field can have varying dimensions (for an example test case, see method vil_nitf2_tagged_record::test()). More... | |
| vil_nitf2_field_definition * | m_definition |
Private Attributes | |
| std::map< vil_nitf2_index_vector, T > | m_value_map |
Typed concrete class for array fields.
Stores values and implements I/O of values.
Definition at line 25 of file vil_nitf2_typed_array_field.h.
|
inline |
Definition at line 29 of file vil_nitf2_typed_array_field.h.
|
inlineoverride |
Destructor (overridden below for instantiations where T is a pointer).
Definition at line 241 of file vil_nitf2_typed_array_field.h.
|
inline |
Definition at line 220 of file vil_nitf2_typed_array_field.h.
|
inline |
Definition at line 231 of file vil_nitf2_typed_array_field.h.
|
inherited |
Definition at line 61 of file vil_nitf2_field.cxx.
|
inherited |
Compares index vector against value dimensions.
Definition at line 49 of file vil_nitf2_array_field.cxx.
|
inherited |
Definition at line 31 of file vil_nitf2_field.cxx.
|
protectedinherited |
Definition at line 102 of file vil_nitf2_array_field.cxx.
|
overridevirtualinherited |
Reimplemented from vil_nitf2_field.
Definition at line 129 of file vil_nitf2_array_field.cxx.
|
protectedinherited |
Definition at line 89 of file vil_nitf2_array_field.cxx.
|
inherited |
Given a partial index vector, return value of next dimension (or zero if none).
Length of indexes must be less than num_dimensions(). See comment for member m_dimensions_map, below; indexes is its key. For example, if indexes is empty, the first dimension is retrieved.
Definition at line 23 of file vil_nitf2_array_field.cxx.
|
overridevirtualinherited |
Number of dimensions.
Implements vil_nitf2_field.
Definition at line 17 of file vil_nitf2_array_field.cxx.
|
overridevirtual |
Output in human-readable form.
Implementation provides an example of how to iterate over all elements.
Implements vil_nitf2_field.
Definition at line 175 of file vil_nitf2_typed_array_field.h.
|
protected |
Definition at line 183 of file vil_nitf2_typed_array_field.h.
|
inherited |
Definition at line 26 of file vil_nitf2_field.cxx.
|
overridevirtual |
Reads from input stream the scalar value at specified index.
check_index(indexes) must be true, or this will emit an error. Returns success.
Implements vil_nitf2_array_field.
Definition at line 109 of file vil_nitf2_typed_array_field.h.
|
inherited |
Definition at line 52 of file vil_nitf2_field.cxx.
|
inherited |
Given a partial index vector, set the value of the next dimension.
Length of indexes must be less than num_dimensions(). See comment for member m_dimensions_map, below; indexes is its key. For example, if indexes is empty, the first dimension is set.
Definition at line 34 of file vil_nitf2_array_field.cxx.
|
inherited |
Definition at line 21 of file vil_nitf2_field.cxx.
|
inherited |
Definition at line 11 of file vil_nitf2_field.cxx.
|
override |
Set out_value to the scalar value at the specified index vector, and returns whether specified element was defined.
The length of the index vector must equal num_dimensions(), and check_index(indexes) must return true to indicate that the indexes are within bounds. Even so, this method may return false if the value is undefined at the specified index. (This is a partial override of overloaded method vil_nitf2_array_field::value() for my specific type.)
Definition at line 92 of file vil_nitf2_typed_array_field.h.
|
inlinevirtualinherited |
Sets out_value to the value of the element selected by specified index vector, which must satisfy check_index().
Returns true iff the value is defined. Note that this may return false because the value is unspecified (i.e., blank), even if the index is valid.
Subclasses overload the appropriate method to set out parameter and return true. The implementation here return false. These methods are defined here for the convenience of my callers, so they don't have to downcast to the specific field type.
Definition at line 92 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 93 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 94 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 95 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 96 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 97 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 98 of file vil_nitf2_array_field.h.
|
inlinevirtualinherited |
Definition at line 99 of file vil_nitf2_array_field.h.
|
overridevirtual |
Writes to output stream the scalar value at specified index.
check_index(indexes) must be true, of this will emit an error. Returns success. Arg variable_width, if non-negative, overrides formatter's field_width.
Implements vil_nitf2_array_field.
Definition at line 148 of file vil_nitf2_typed_array_field.h.
|
protectedinherited |
Definition at line 80 of file vil_nitf2_field.h.
|
protectedinherited |
Because a repeating field's dimension can depend on the value of another repeating field, slices of a multi-dimensional vector field can have varying dimensions (for an example test case, see method vil_nitf2_tagged_record::test()).
Dimensions are therefore stored here as follows:
Definition at line 122 of file vil_nitf2_array_field.h.
|
protectedinherited |
Dimensionality of vector field.
Definition at line 108 of file vil_nitf2_array_field.h.
|
private |
Definition at line 79 of file vil_nitf2_typed_array_field.h.
1.8.15