49 value = filter_function();
52 void verify_integrity(){ };
55 Filter(
const std::string&
name, std::function<
bool()> filter_function,
const std::string& impl=
"")
57 filter_function(GenFunction::register_function<
bool()>(
"filter::"+
name, filter_function, impl)){ }
63 auto new_name = this->get_name() +
"&&" + f->get_name();
71 auto new_name = this->get_name() +
"||" + f->get_name();
78 auto new_name = std::string(
"!(") + this->get_name() + std::string(
")");
88 Filter(name, [test_value, range_low, range_high]{
90 return (val >= range_low) && (val < range_high);
bool & get_value()
Definition: value.hpp:412
std::string name
The name of the value.
Definition: value.hpp:220
Definition: filter.hpp:44
The namespace containing all filval classes and functions.
Definition: api.hpp:6
Filter * operator+(Filter *f)
Return a new filter that is the disjunction of the two source filters.
Definition: filter.hpp:70
A generic value.
Definition: value.hpp:338
Definition: filter.hpp:84
A generic, derived, value.
Definition: value.hpp:389
Filter * operator*(Filter *f)
Return a new filter that is the conjuction of the two source filters.
Definition: filter.hpp:62
void update_value()
Updates the internal value.
Definition: filter.hpp:48
Filter * operator!()
Return a new filter that is the negation of the source filter.
Definition: filter.hpp:77
virtual T & get_value()=0
Calculate, if necessary, and return the value held by this object.