MeshKit  1.0
GraphNode Class Reference

A parent class for anything that will be a graph node. More...

#include <meshkit/GraphNode.hpp>

Inheritance diagram for GraphNode:

List of all members.

Public Member Functions

 GraphNode (const GraphNode &graph_node)
 Copy constructor.
 GraphNode (MKGraph *graph)
 Bare constructor.
virtual ~GraphNode ()
 Destructor.
MKGraphget_graph () const
 Get the associated MKGraph object.
lemon::ListDigraph::Node get_node () const
 Get the graph node corresponding to this GraphNode.
lemon::ListDigraph::InArcIt in_arcs () const
 Return an iterator over incoming graph edges.
lemon::ListDigraph::OutArcIt out_arcs () const
 Return an iterator over outgoing graph edges.
GraphNodeother_node (lemon::ListDigraph::Arc arc)
 Return the GraphNode at the other end of a connected graph edge.
virtual std::string get_name () const
 Get node name.
virtual void set_name (std::string new_name)
 Set node name.
virtual void setup_this ()=0
 Pure virtual, derived class must define.
virtual void execute_this ()=0
 Pure virtual, derived class must define.
bool setup_called () const
 Get flag denoting whether setup_this has been called for this node.
void setup_called (bool flag)
 Set flag denoting whether setup_this has been called for this node.
bool execute_called () const
 Get flag denoting whether execute_this has been called for this node.
void execute_called (bool flag)
 Set flag denoting whether execute_this has been called for this node.

Protected Attributes

MKGraphmkGraph
 MKGraph associated with this GraphNode.
lemon::ListDigraph::Node graphNode
 The graph node associated with this GraphNode.
std::string nodeName
 Local name for this node.
bool setupCalled
 Flag denoting whether setup_this has been called for this node.
bool executeCalled
 Flag denoting whether execute_this has been called for this node.

Friends

class MKGraph
 Friend class, to allow more direct access.

Detailed Description

A parent class for anything that will be a graph node.

This class encapsulates operations on graph nodes, like inserting/removing in graph, inserting new parents, etc. This class HasA Lemon node object (which is really just an index into the graph node vector). Instances of this class keep a pointer to a MKGraph object, which is really usually just the MKCore instance, where the graph itself is stored.

Definition at line 20 of file GraphNode.hpp.


Constructor & Destructor Documentation

GraphNode ( const GraphNode graph_node) [inline]

Copy constructor.

Definition at line 106 of file GraphNode.hpp.

GraphNode ( MKGraph graph) [inline]

Bare constructor.

Definition at line 122 of file GraphNode.hpp.

~GraphNode ( ) [inline, virtual]

Destructor.

Definition at line 138 of file GraphNode.hpp.


Member Function Documentation

bool execute_called ( ) const [inline]

Get flag denoting whether execute_this has been called for this node.

Returns:
Value of executeCalled

Definition at line 192 of file GraphNode.hpp.

void execute_called ( bool  flag) [inline]

Set flag denoting whether execute_this has been called for this node.

Parameters:
flagNew value for setupCalled

Definition at line 198 of file GraphNode.hpp.

MKGraph * get_graph ( ) const [inline]

Get the associated MKGraph object.

Definition at line 164 of file GraphNode.hpp.

std::string get_name ( ) const [inline, virtual]

Get node name.

Definition at line 144 of file GraphNode.hpp.

lemon::ListDigraph::Node get_node ( ) const [inline]

Get the graph node corresponding to this GraphNode.

Examples:
example_copygeom.cpp, example_extrudemesh.cpp, and example_tfimapping.cpp.

Definition at line 170 of file GraphNode.hpp.

lemon::ListDigraph::InArcIt in_arcs ( ) const [inline]

Return an iterator over incoming graph edges.

Definition at line 154 of file GraphNode.hpp.

GraphNode * other_node ( lemon::ListDigraph::Arc  arc) [inline]

Return the GraphNode at the other end of a connected graph edge.

Parameters:
arcEdge being queried
Returns:
GraphNode corresponding to the other graph node

Definition at line 175 of file GraphNode.hpp.

lemon::ListDigraph::OutArcIt out_arcs ( ) const [inline]

Return an iterator over outgoing graph edges.

Definition at line 159 of file GraphNode.hpp.

void set_name ( std::string  new_name) [inline, virtual]
bool setup_called ( ) const [inline]

Get flag denoting whether setup_this has been called for this node.

Returns:
Value of executeCalled

Definition at line 181 of file GraphNode.hpp.

void setup_called ( bool  flag) [inline]

Set flag denoting whether setup_this has been called for this node.

Parameters:
flagNew value for setupCalled

Definition at line 187 of file GraphNode.hpp.


Friends And Related Function Documentation

friend class MKGraph [friend]

Friend class, to allow more direct access.

Definition at line 26 of file GraphNode.hpp.


Member Data Documentation

bool executeCalled [protected]

Flag denoting whether execute_this has been called for this node.

Definition at line 101 of file GraphNode.hpp.

lemon::ListDigraph::Node graphNode [protected]

The graph node associated with this GraphNode.

Definition at line 92 of file GraphNode.hpp.

MKGraph* mkGraph [protected]

MKGraph associated with this GraphNode.

Definition at line 89 of file GraphNode.hpp.

std::string nodeName [protected]

Local name for this node.

Definition at line 95 of file GraphNode.hpp.

bool setupCalled [protected]

Flag denoting whether setup_this has been called for this node.

Definition at line 98 of file GraphNode.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines