1 #ifndef RUN_BLOCK_FILTER_H_
2 #define RUN_BLOCK_FILTER_H_
7 #include "graph_filter.h"
14 template<
typename GraphType>
25 std::string executable_name,
28 executable_name_ = executable_name;
38 valid_executable_ =
false;
43 valid_executable_ =
true;
44 SWUSet::iterator it = swus->begin();
45 for(; it != swus->end(); ++it) {
46 swu_names_.push_back((*it)->name());
60 return !this->inverted_;
65 if(!valid_executable_)
67 return this->enabled_;
72 if(this->enabled_ && valid_executable_) {
74 std::vector<std::string>::iterator res = std::find(swu_names_.begin(), swu_names_.end(), swu->
name());
76 if(res == swu_names_.end() && !this->inverted_) {
78 }
else if(res != swu_names_.end() && this->inverted_) {
86 template<
typename P1,
typename P2>
91 std::string executable_name() {
92 return executable_name_;
95 std::vector<std::string>& swu_names() {
99 std::string executable_name_;
100 std::vector<std::string> swu_names_;
101 bool valid_executable_;
Definition: run_block_filter.h:15
Forward declarations for functors.
Definition: defines.h:32
RunBlockFilter(std::string filter_name, std::string executable_name, Linkler *l)
Definition: run_block_filter.h:24
std::string name() const
Accessor for name.
Definition: swu.cc:151
Definition: graph_filter.h:15
virtual bool operator()(E_type edge)
Ignores edges.
Definition: run_block_filter.h:59
virtual GraphFilter< GraphType > * clone()
Clone action.
Definition: run_block_filter.h:53
SWUSet * get_full_swuset(std::string e_name)
Definition: linkler.cc:265
virtual bool enabled() const
Disable the filter if no valid executable was used.
Definition: run_block_filter.h:64
void set_linkler(Linkler *l)
Definition: run_block_filter.h:35