GraphTool
1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
|
#include <regex_filter.h>
Public Types | |
typedef GraphType::node_value_type | V_type |
typedef GraphType::edge_value_type | E_type |
Public Types inherited from GraphFilter< GraphType > | |
typedef GraphType::node_value_type | V_type |
typedef GraphType::edge_value_type | E_type |
Public Member Functions | |
RegexFilter (std::string pattern) | |
RegexFilter (std::string filter_name, std::string pattern) | |
virtual GraphFilter< GraphType > * | clone () |
Clone operation. | |
virtual bool | operator() (E_type edge) |
Ignores edges - no action. | |
virtual bool | operator() (V_type m) |
template<typename P1 , typename P2 > | |
bool | operator() (std::pair< P1, P2 > &m) |
Operator used for STL. | |
std::string | pattern () |
Public Member Functions inherited from GraphFilter< GraphType > | |
GraphFilter (std::string filter_name="", std::string filter_type="", bool inverted=false, bool enabled=true, bool nodes=true, bool edges=true) | |
void | set_inverted (bool status) |
Sets the inverted status. | |
void | set_enabled (bool enabled) |
Sets enabled. | |
std::string | name () const |
std::string | type () const |
bool | inverted () const |
virtual bool | enabled () const |
virtual bool | nodes () const |
The nodes property tells us whether this filter operates on nodes. | |
virtual bool | edges () const |
The edgesproperty tells us whether this filter operates on nodes. | |
template<typename P1 , typename P2 > | |
bool | operator() (std::pair< P1, P2 > &m) |
Additional Inherited Members | |
Protected Attributes inherited from GraphFilter< GraphType > | |
bool | inverted_ |
bool | enabled_ |
bool | nodes_ |
bool | edges_ |
Filter used for filtering Graphs depending on given regex.
The filter will filter out nodes with name that does not match the given regex pattern.
To use the filter instancate an object and then use the () operator to check whether a node is to be included or not. The () operator returns true if the the node (or in case of edges both source or destination node) matches the regex and false otherwise. To invert the behaviour provide the invert parameter which results in the opposite behaviour.
Requires POSIX-type regex.h.
|
inlinevirtual |
Only if a node matches the regexp can this return true if a node does not match the regexp this returns false.
Implements GraphFilter< GraphType >.