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 | List of all members
DiffFilter< GraphType > Class Template Reference

#include <diff_filter.h>

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

Public Types

enum  filter_type { ADDED, REMOVED, UNCHANGED }
 
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

 DiffFilter (std::string filter_name, LinklerDiff *ld, filter_type ft)
 
 DiffFilter (std::string filter_name, filter_type ft)
 
void set_LinklerDiff (LinklerDiff *ld)
 
void set_filter_type (filter_type ft)
 
virtual GraphFilter< GraphType > * clone ()
 
virtual bool operator() (E_type e)
 Returns true if the give edgen matches the filter.
 
virtual bool operator() (V_type v)
 Returns true if the given node should be included, or false if it is to be filtered out.
 
virtual bool enabled () const
 Overload the enabled method by graph filter to check for the linkler_diff_ being set or not.
 
template<typename P1 , typename P2 >
bool operator() (std::pair< P1, P2 > &m)
 Operator used for STL.
 
std::string type ()
 
- 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 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_
 

Detailed Description

template<typename GraphType>
class DiffFilter< GraphType >

Filter for performing actions on a graph based on a LinklerDiff for that graph. It will return true for any nodes included in the set of added , removed or remaining nodes in the graph based on the diff result.

Member Enumeration Documentation

template<typename GraphType>
enum DiffFilter::filter_type

Types that represent the state of a node or edge

Constructor & Destructor Documentation

template<typename GraphType>
DiffFilter< GraphType >::DiffFilter ( std::string  filter_name,
LinklerDiff ld,
filter_type  ft 
)
inline

Constructor - needs to be provided with a LinklerDiff which is appropriate for the graph on which this filter will be used. If not, then this filter will not be able to take any action.

Parameters
ldLinklerDiff to use
ftThe type of filter can be either ADDED, REMOVED or UNCHANGED.
template<typename GraphType>
DiffFilter< GraphType >::DiffFilter ( std::string  filter_name,
filter_type  ft 
)
inline

Constructor - Creates a DiffFilter without an associated LinklerDiff. The LinklerDiff can then be set later.

Parameters
ftThe type of filter can be either ADDED, REMOVED or UNCHANGED.

Member Function Documentation

template<typename GraphType>
virtual GraphFilter<GraphType>* DiffFilter< GraphType >::clone ( )
inlinevirtual

Clone the filter

Implements GraphFilter< GraphType >.

template<typename GraphType>
void DiffFilter< GraphType >::set_filter_type ( filter_type  ft)
inline

Set the type to filter for.

Parameters
ftthe type to filter for
template<typename GraphType>
void DiffFilter< GraphType >::set_LinklerDiff ( LinklerDiff ld)
inline

Set the linklerdiff that will be used when filtering.

Parameters
ldpointer to the linklerdiff object to use

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