GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
hide_action.h
1 #ifndef HIDE_ACTION_
2 #define HIDE_ACTION_
3 
4 #include <string>
5 
6 #include "graph_filter.h"
7 #include "graph_action.h"
8 #include "graph_properties.h"
9 
15 template<typename GraphType>
16 class HideAction : public GraphAction<GraphType> {
17  public:
18  typedef typename GraphType::node_value_type V_type;
19  typedef typename GraphType::edge_value_type E_type;
20  typedef typename GraphType::index_type_t index_type_t;
21 
27  GraphAction<GraphType>(filter) {
28  }
29 
32  GraphAction<GraphType>(copy) {
33  }
34 
36  virtual bool operator() (E_type edge) {
38  }
39 
41  virtual bool operator() (V_type m) {
42  if(this->filter_->enabled() && this->filter_->nodes())
43  return this->run_filter(m);
44  else
45  return true;
46  }
47 
49  template<typename P1, typename P2>
50  bool operator() (std::pair<P1, P2>& m) {
51  return operator()(m.second);
52  }
53 };
54 
55 #endif
virtual bool operator()(E_type edge)
Operator used to filter edges.
Definition: hide_action.h:36
HideAction(HideAction &copy)
Copy constructor (required to make sure parent is initialized)
Definition: hide_action.h:31
Forward declarations for functors.
Definition: defines.h:32
GraphFilter< GraphType > * filter()
Definition: graph_action.h:45
Definition: graph_action.h:13
Definition: hide_action.h:16
HideAction(GraphFilter< GraphType > *filter)
Definition: hide_action.h:26
Definition: graph_filter.h:15
Definition: swu.h:27
bool run_filter(P arg)
Definition: graph_action.h:70
GraphFilter< GraphType > * filter_
The filter is used to indicate whether the action should be taken or not.
Definition: graph_action.h:79
unsigned int index_type_t
The type of index used for the nodes in the graph.
Definition: grapher.h:52