OpenASIP
2.0
|
#include <GraphUtilities.hh>
Public Member Functions | |
GraphNodeFunctor (const Graph &pGraph) | |
Constructor. Keep record of the parent graph of the nodes to work on. More... | |
virtual | ~GraphNodeFunctor () |
Destructor. Subclasses should clean up any state created during operation in this method. More... | |
virtual void | operator() (GraphNode &) const =0 |
Operation to apply to a given node of the graph. More... | |
Protected Attributes | |
const Graph * | graph_ |
Expected parent graph. More... | |
Base template class for functors that apply to graph nodes.
The node type is an independent template parameter. This enables using a subclass instead of the actual graph node class, or even an unrelated class, as long as it provides an appropriate conversion operator.
When the graph contains several specialised types of nodes, the template parameter should be convertible to the base node type.
Definition at line 51 of file GraphUtilities.hh.
|
inline |
Constructor. Keep record of the parent graph of the nodes to work on.
Definition at line 54 of file GraphUtilities.hh.
|
inlinevirtual |
Destructor. Subclasses should clean up any state created during operation in this method.
Definition at line 58 of file GraphUtilities.hh.
|
pure virtual |
Operation to apply to a given node of the graph.
|
protected |
Expected parent graph.
Definition at line 64 of file GraphUtilities.hh.