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

#include <set_property_action.h>

Inheritance diagram for SetPropertyAction< GraphType >:
Inheritance graph
[legend]
Collaboration diagram for SetPropertyAction< 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
 
typedef std::map< std::string,
std::string > 
PropertyMap
 
typedef PropertyMap::iterator iterator
 
typedef PropertyMap::const_iterator const_iterator
 
- Public Types inherited from GraphAction< GraphType >
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

 SetPropertyAction (GraphProperties< GraphType > &properties, GraphFilter< GraphType > *property_filter)
 
 SetPropertyAction (SetPropertyAction &copy)
 Copy constructor.
 
virtual bool operator() (E_type edge)
 
virtual bool operator() (V_type m)
 
template<typename P1 , typename P2 >
bool operator() (std::pair< P1, P2 > &m)
 Operator used for STL.
 
iterator begin ()
 Returns an iterator to the beginning of a map of property name/values.
 
iterator end ()
 Returns an iterator to the end of a map of property name/values.
 
void set_property (std::string name, std::string value)
 Sets a specific property to be set when finding nodes matching the filter.
 
std::string get_property (std::string name)
 
- Public Member Functions inherited from GraphAction< GraphType >
 GraphAction (GraphFilter< GraphType > *filter)
 
 GraphAction (GraphAction< GraphType > &copy)
 
virtual ~GraphAction ()
 
GraphFilter< GraphType > * filter ()
 
template<typename P1 , typename P2 >
bool operator() (std::pair< P1, P2 > &m)
 Operator used for STL.
 
template<typename P >
bool run_filter (P arg)
 

Additional Inherited Members

- Protected Attributes inherited from GraphAction< GraphType >
GraphFilter< GraphType > * filter_
 The filter is used to indicate whether the action should be taken or not.
 

Detailed Description

template<typename GraphType>
class SetPropertyAction< GraphType >

A filter which sets properties based on a given filter.. Takes a GraphProperties reference which it uses to set properties on specific nodes based on them matching the filter or not.

Constructor & Destructor Documentation

template<typename GraphType >
SetPropertyAction< GraphType >::SetPropertyAction ( GraphProperties< GraphType > &  properties,
GraphFilter< GraphType > *  property_filter 
)
inline

Constructor for the filter. This filter has side-effects in that it sets properties on the supplied GraphProperties set.

Parameters
propertiesA reference to the set of properties
property_filterThe GraphFilter to use when checking whether to set properties on nodes or not.

Member Function Documentation

template<typename GraphType >
std::string SetPropertyAction< GraphType >::get_property ( std::string  name)
inline

Fetches a property value for a given property. Will return an empty string "" for unset properties.

Returns
Property value or an empty string in case property is not set.
template<typename GraphType >
virtual bool SetPropertyAction< GraphType >::operator() ( E_type  edge)
inlinevirtual

Operator used to filter edges. This always returns true as this filter has no impact on edges (properties are only set on nodes).

Returns
Always returns true.

Implements GraphAction< GraphType >.

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

Run the property action on the node. If the filter is enabled and returns true then the property will be set.

Returns
Always true as the action is not to filter/hide the node but to set a property.

Implements GraphAction< GraphType >.


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