Public Member Functions | Protected Attributes | List of all members
vil_nitf2_field_value_one_of< T > Class Template Reference

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 std::vector of acceptable values. More...

#include <vil_nitf2_field_functor.h>

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

Public Member Functions

 vil_nitf2_field_value_one_of (std::string tag, std::vector< T > acceptable_values)
 Constructor to specify a std::vector of acceptable values. More...
 
 vil_nitf2_field_value_one_of (std::string tag, T acceptable_value)
 Constructor to specify only one acceptable value. More...
 
vil_nitf2_field_functor< bool > * copy () const override
 
bool operator() (vil_nitf2_field_sequence *record, const vil_nitf2_index_vector &indexes, bool &result) override
 

Protected Attributes

std::string tag
 
std::vector< T > acceptable_values
 

Detailed Description

template<typename T>
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 std::vector of acceptable values.

Definition at line 220 of file vil_nitf2_field_functor.h.

Constructor & Destructor Documentation

◆ vil_nitf2_field_value_one_of() [1/2]

template<typename T >
vil_nitf2_field_value_one_of< T >::vil_nitf2_field_value_one_of ( std::string  tag,
std::vector< T >  acceptable_values 
)
inline

Constructor to specify a std::vector of acceptable values.

Definition at line 224 of file vil_nitf2_field_functor.h.

◆ vil_nitf2_field_value_one_of() [2/2]

template<typename T >
vil_nitf2_field_value_one_of< T >::vil_nitf2_field_value_one_of ( std::string  tag,
acceptable_value 
)
inline

Constructor to specify only one acceptable value.

Definition at line 228 of file vil_nitf2_field_functor.h.

Member Function Documentation

◆ copy()

template<typename T >
vil_nitf2_field_functor<bool>* vil_nitf2_field_value_one_of< T >::copy ( ) const
inlineoverridevirtual

Implements vil_nitf2_field_functor< bool >.

Definition at line 231 of file vil_nitf2_field_functor.h.

◆ operator()()

template<typename T >
bool vil_nitf2_field_value_one_of< T >::operator() ( vil_nitf2_field_sequence record,
const vil_nitf2_index_vector indexes,
bool &  result 
)
inlineoverridevirtual

Implements vil_nitf2_field_functor< bool >.

Definition at line 234 of file vil_nitf2_field_functor.h.

Member Data Documentation

◆ acceptable_values

template<typename T >
std::vector<T> vil_nitf2_field_value_one_of< T >::acceptable_values
protected

Definition at line 255 of file vil_nitf2_field_functor.h.

◆ tag

template<typename T >
std::string vil_nitf2_field_value_one_of< T >::tag
protected

Definition at line 254 of file vil_nitf2_field_functor.h.


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