GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
noop_action.h
1 #ifndef NOOP_ACTION_
2 #define NOOP_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 NoopAction : 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  }
30 
33  GraphAction<GraphType>(copy) {
34  }
35 
37  virtual bool operator() (E_type edge) {
38  (void)edge;
39  return true;
40  }
41 
43  virtual bool operator() (V_type m) {
44  (void)m;
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
Forward declarations for functors.
Definition: defines.h:32
GraphFilter< GraphType > * filter()
Definition: graph_action.h:45
Definition: graph_action.h:13
NoopAction(GraphFilter< GraphType > *filter)
Definition: noop_action.h:26
Definition: noop_action.h:16
NoopAction(NoopAction &copy)
Copy constructor (required to make sure parent is initialized)
Definition: noop_action.h:32
Definition: graph_filter.h:15
Definition: swu.h:27
virtual bool operator()(E_type edge)
Operator used to filter edges, at present this does nothing but call parent in hierarchy.
Definition: noop_action.h:37
unsigned int index_type_t
The type of index used for the nodes in the graph.
Definition: grapher.h:52