OpenASIP  2.0
Public Member Functions | Protected Attributes | List of all members
GraphEdgeFunctor< Graph, GraphEdge > Class Template Referenceabstract

#include <GraphUtilities.hh>

Collaboration diagram for GraphEdgeFunctor< Graph, GraphEdge >:
Collaboration graph

Public Member Functions

 GraphEdgeFunctor (const Graph &pGraph)
 Constructor. Keep record of the parent graph of the nodes to work on. More...
 
virtual ~GraphEdgeFunctor ()
 Destructor. Subclasses should clean up any state created during operation in this method. More...
 
virtual void operator() (GraphEdge &) const =0
 Operation to apply to a given edge of the graph. More...
 

Protected Attributes

const Graph * graph_
 Expected parent graph. More...
 

Detailed Description

template<typename Graph, typename GraphEdge>
class GraphEdgeFunctor< Graph, GraphEdge >

Base template class for functors that apply to graph edges.

The edge type is an independent template parameter. This enables using a subclass instead of the actual graph edge class, or even an unrelated class, as long as it provides an appropriate conversion operator.

When the graph contains several specialised types of edges, the template parameter should be convertible to the base edge type.

Definition at line 79 of file GraphUtilities.hh.

Constructor & Destructor Documentation

◆ GraphEdgeFunctor()

template<typename Graph , typename GraphEdge >
GraphEdgeFunctor< Graph, GraphEdge >::GraphEdgeFunctor ( const Graph &  pGraph)
inline

Constructor. Keep record of the parent graph of the nodes to work on.

Definition at line 82 of file GraphUtilities.hh.

82  :
83  graph_(&pGraph) {}

◆ ~GraphEdgeFunctor()

template<typename Graph , typename GraphEdge >
virtual GraphEdgeFunctor< Graph, GraphEdge >::~GraphEdgeFunctor ( )
inlinevirtual

Destructor. Subclasses should clean up any state created during operation in this method.

Definition at line 86 of file GraphUtilities.hh.

86 { };

Member Function Documentation

◆ operator()()

template<typename Graph , typename GraphEdge >
virtual void GraphEdgeFunctor< Graph, GraphEdge >::operator() ( GraphEdge ) const
pure virtual

Operation to apply to a given edge of the graph.

Member Data Documentation

◆ graph_

template<typename Graph , typename GraphEdge >
const Graph* GraphEdgeFunctor< Graph, GraphEdge >::graph_
protected

Expected parent graph.

Definition at line 92 of file GraphUtilities.hh.


The documentation for this class was generated from the following file:
GraphEdgeFunctor::graph_
const Graph * graph_
Expected parent graph.
Definition: GraphUtilities.hh:92