GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
GraphAction< GraphType > Class Template Referenceabstract

#include <graph_action.h>

Inheritance diagram for GraphAction< GraphType >:
Inheritance graph
[legend]
Collaboration diagram for GraphAction< GraphType >:
Collaboration graph
[legend]

Public Types

typedef GraphType::node_value_type V_type
 
typedef GraphType::edge_value_type E_type
 
typedef GraphType::index_type_t index_type_t
 

Public Member Functions

 GraphAction (GraphFilter< GraphType > *filter)
 
 GraphAction (GraphAction< GraphType > &copy)
 
virtual ~GraphAction ()
 
GraphFilter< GraphType > * filter ()
 
virtual bool operator() (E_type edge)=0
 
virtual bool operator() (V_type node)=0
 
template<typename P1 , typename P2 >
bool operator() (std::pair< P1, P2 > &m)
 Operator used for STL.
 
template<typename P >
bool run_filter (P arg)
 

Protected Attributes

GraphFilter< GraphType > * filter_
 The filter is used to indicate whether the action should be taken or not.
 

Detailed Description

template<typename GraphType>
class GraphAction< GraphType >

Base class for Graph Actions. Graph Actions are actions taken on the Graph on the basis of a specific condition (GraphFilter). Graph Actions can be chained in a list using GraphFilterList.

Constructor & Destructor Documentation

template<typename GraphType>
GraphAction< GraphType >::GraphAction ( GraphFilter< GraphType > *  filter)
inline

Constructor - takes a filter as a parameter which it assumes will be allocated specifically for this graph action. On destruction this filter memory will be freed.

template<typename GraphType>
GraphAction< GraphType >::GraphAction ( GraphAction< GraphType > &  copy)
inline

Copy constructor. Performs a deep copy on the filter.

template<typename GraphType>
virtual GraphAction< GraphType >::~GraphAction ( )
inlinevirtual

Destructor also frees the memory of the associated filter.

Member Function Documentation

template<typename GraphType>
GraphFilter<GraphType>* GraphAction< GraphType >::filter ( )
inline

Returns a pointer to the internal filter.

template<typename GraphType>
virtual bool GraphAction< GraphType >::operator() ( E_type  edge)
pure virtual

Graph actions implement operators which operate on edges. Can take any action and returns true if the node should be included and false if it should be filtered out.

Implemented in SetPropertyAction< GraphType >, NoopAction< GraphType >, and HideAction< GraphType >.

template<typename GraphType>
virtual bool GraphAction< GraphType >::operator() ( V_type  node)
pure virtual

Graph actions implement operators which operate on nodes. Can take any action and returns true if the node should be included and false if it should be filtered out.

Implemented in SetPropertyAction< GraphType >, NoopAction< GraphType >, and HideAction< GraphType >.

template<typename GraphType>
template<typename P >
bool GraphAction< GraphType >::run_filter ( arg)
inline

Generic tool to run the associated filter. In case the filter is disabled, this will always return true.


The documentation for this class was generated from the following file: