GraphTool
1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
|
#include <graph_filter.h>
Public Types | |
typedef GraphType::node_value_type | V_type |
typedef GraphType::edge_value_type | E_type |
Public Member Functions | |
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. | |
virtual GraphFilter< GraphType > * | clone ()=0 |
virtual bool | operator() (V_type m)=0 |
Returns true if the given node should be included, or false if it is to be filtered out. | |
virtual bool | operator() (E_type e)=0 |
Returns true if the give edgen matches the filter. | |
template<typename P1 , typename P2 > | |
bool | operator() (std::pair< P1, P2 > &m) |
Protected Attributes | |
bool | inverted_ |
bool | enabled_ |
bool | nodes_ |
bool | edges_ |
Class used to filter the graph. This is the base class from which additional filters can be implemented. This class simply has one method (therefore act as a functor) which returns false if this node should be filtered (ie. not added to the graph) and true otherwise.
Filters are used in conjuction with GraphActions to perform actions on a Grapher object.
|
inline |
Constructor
filter_name | Name of the filter |
filter_type | Name of the filter type |
inverted | Filter is inverted |
|
pure virtual |
Clone method, in order to work with this polymorphic object we might need to clone it therefore it must implement the clone operation
Implemented in DiffFilter< GraphType >, DependencyDegreeFilter< GraphType >, RunBlockFilter< GraphType >, RegexFilter< GraphType >, NodeExclusionFilter< GraphType >, BlueColourFilter< GraphType >, EdgeTypeFilter< GraphType >, TrueFilter< GraphType >, and InvertFilter< GraphType >.
|
inlinevirtual |
Whether or not this filter is enabled, meaning whether it should have any impact on the graph or not
Reimplemented in DiffFilter< GraphType >, and RunBlockFilter< GraphType >.
|
inline |
Whether or not this filter is inverted or not, inverted means that the filter will return the opposite result to what it otherwise does (ie. true if the node or edge does NOT match the filter).
|
inline |
Returns the name/ID of the filter
|
inline |
Operator used for STL to handle generic pairs, in our case Grapher stores pairs for both edges and nodes so this allows this filter to be used with the STL algorithms for both edges and nodes. operator() polymorphism handles figuring out which operator() to use.
|
inline |
Returns the type name of the filter