FMT 0.9.8
Forest management tools for forest planning
|
#include <FMTaction.hpp>
Public Member Functions | |
FMTactioncomparator (std::string name, bool lcheckaggregate=false) | |
std::vector< const FMTaction * > | getallaggregates (const std::vector< FMTaction > &actions, bool aggregateonly=false) const |
std::unordered_set< int > | getallaggregatesset (const std::vector< FMTaction > &actions, bool aggregateonly=false) const |
bool | operator() (const FMTaction &action) const |
FMTactioncomparator to check if the action_name already exist in a std container. It can also check for aggregates.
Core::FMTactioncomparator::FMTactioncomparator | ( | std::string | name, |
bool | lcheckaggregate = false |
||
) |
FMTactioncomparator constructor name is the name of the action we want to match if checkaggregate = true it will also return actions within the named aggregate.
std::vector< const FMTaction * > Core::FMTactioncomparator::getallaggregates | ( | const std::vector< FMTaction > & | actions, |
bool | aggregateonly = false |
||
) | const |
Looking at the actions vector if aggregateonly = false it will returns actions mathching the action_name if aggregateonly = true it will return only matching aggregates.
std::unordered_set< int > Core::FMTactioncomparator::getallaggregatesset | ( | const std::vector< FMTaction > & | actions, |
bool | aggregateonly = false |
||
) | const |
Looking at the actions vector if aggregateonly = false it will returns actions ids mathching the action_name if aggregateonly = true it will return only matching aggregates.
bool Core::FMTactioncomparator::operator() | ( | const FMTaction & | action | ) | const |
Matching test operator for FMTactioncomparator.