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
DependencyDegreeFilter< GraphType > Class Template Reference

#include <dependency_degree_filter.h>

Inheritance diagram for DependencyDegreeFilter< GraphType >:
Inheritance graph
[legend]
Collaboration diagram for DependencyDegreeFilter< 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 Types inherited from GraphFilter< GraphType >
typedef GraphType::node_value_type V_type
 
typedef GraphType::edge_value_type E_type
 

Public Member Functions

 DependencyDegreeFilter (std::string filter_name, int min_degree, int max_degree, bool dependents=true, bool dependencies=true)
 
 DependencyDegreeFilter (int min_degree, int max_degree, bool dependents=true, bool dependencies=true)
 
virtual GraphFilter< GraphType > * clone ()
 
virtual bool operator() (E_type edge)
 
virtual bool operator() (V_type m)
 
void set_dependents (bool dependents)
 
void set_dependencies (bool dependencies)
 
template<typename P1 , typename P2 >
bool operator() (std::pair< P1, P2 > &m)
 
int min_degree ()
 
int max_degree ()
 
bool dependents ()
 
bool dependencies ()
 
- 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_
 

Detailed Description

template<typename GraphType>
class DependencyDegreeFilter< GraphType >

Filter used for filtering SWUs or modules dependending on the sum of the number of dependencies (outging dependencies) and the number of dependents (incoming dependencies). The sum is called degree in this context since the filter is applied to nodes in a graph where the nodes represents SWUs or modules. Inherits the GraphFilter class.

Constructor & Destructor Documentation

template<typename GraphType>
DependencyDegreeFilter< GraphType >::DependencyDegreeFilter ( std::string  filter_name,
int  min_degree,
int  max_degree,
bool  dependents = true,
bool  dependencies = true 
)
inline

Constructor for the DependencyDegreeFilter class.

Parameters
filter_nameThe name of the filter.
min_degreeThe lowest degree to match.
max_degreeThe maximum degree to match.
dependentsSet to true if the filter should take dependents into account.
dependenciesSet to true if the filter should take dependencies into account.
template<typename GraphType>
DependencyDegreeFilter< GraphType >::DependencyDegreeFilter ( int  min_degree,
int  max_degree,
bool  dependents = true,
bool  dependencies = true 
)
inline

Constructor for the DependencyDegreeFilter class.

Parameters
min_degreeThe lowest degree to match.
max_degreeThe maximum degree to match.
dependentsSet to true if the filter should take dependents into account.
dependenciesSet to true if the filter should take dependencies into account.

Member Function Documentation

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

Clone the filter

Implements GraphFilter< GraphType >.

template<typename GraphType>
bool DependencyDegreeFilter< GraphType >::dependencies ( )
inline

Returns true if the number of dependencies are taken into account.

template<typename GraphType>
bool DependencyDegreeFilter< GraphType >::dependents ( )
inline

Returns true if the number of dependents are taken into account.

template<typename GraphType>
int DependencyDegreeFilter< GraphType >::max_degree ( )
inline

Returns the maximum degree to match.

template<typename GraphType>
int DependencyDegreeFilter< GraphType >::min_degree ( )
inline

Returns the lowest degree to match.

template<typename GraphType>
virtual bool DependencyDegreeFilter< GraphType >::operator() ( E_type  edge)
inlinevirtual

Default implementation for edges since we don't use them

Implements GraphFilter< GraphType >.

template<typename GraphType>
virtual bool DependencyDegreeFilter< GraphType >::operator() ( V_type  m)
inlinevirtual

Operator used to filter nodes.

Parameters
edgeThe pointer to the edge that the filter is being applied to.
Returns
True if it should be filtered, false otherwise

Implements GraphFilter< GraphType >.

template<typename GraphType>
template<typename P1 , typename P2 >
bool DependencyDegreeFilter< GraphType >::operator() ( std::pair< P1, P2 > &  m)
inline

Operator used for STL algorithms.

template<typename GraphType>
void DependencyDegreeFilter< GraphType >::set_dependencies ( bool  dependencies)
inline

Set whether to include dependencies in the degree calculation

Parameters
dependenciesSet to true if the filter should take dependencies into account.
template<typename GraphType>
void DependencyDegreeFilter< GraphType >::set_dependents ( bool  dependents)
inline

Set whether to include dependents in the degree calculation.

Parameters
dependentsSet to true if the filter should take dependents into account.

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