GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
true_filter.h
1 #ifndef TRUE_FILTER_H_
2 #define TRUE_FILTER_H_
3 
4 #include <string>
5 #include <iostream>
6 #include "graph_filter.h"
7 
11 template<typename GraphType>
12 class TrueFilter : public GraphFilter<GraphType> {
13  public:
14  typedef typename GraphType::node_value_type V_type;
15  typedef typename GraphType::edge_value_type E_type;
16  typedef typename GraphType::index_type_t index_type_t;
17 
21  TrueFilter(std::string filter_name) :
22  GraphFilter<GraphType>(filter_name, "true_filter") {
23  }
24 
30  return clone;
31  }
32 
36  virtual bool operator() (E_type edge) {
37  (void)edge;
38  if(this->inverted_)
39  return false;
40  else
41  return true;
42  }
43 
47  virtual bool operator() (V_type m) {
48  (void)m;
49  if(this->inverted_)
50  return false;
51  else
52  return true;
53  }
54 
58  template<typename P1, typename P2>
59  bool operator() (std::pair<P1, P2>& m) {
60  return operator()(m.second);
61  }
62 };
63 
64 #endif
virtual GraphFilter< GraphType > * clone()
Definition: true_filter.h:28
TrueFilter(std::string filter_name)
Definition: true_filter.h:21
Forward declarations for functors.
Definition: defines.h:32
Definition: graph_filter.h:15
Definition: swu.h:27
virtual bool operator()(E_type edge)
Definition: true_filter.h:36
unsigned int index_type_t
The type of index used for the nodes in the graph.
Definition: grapher.h:52
Definition: true_filter.h:12