DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Diades::Graph::NodeData Class Reference

#include <NodeData.hh>

Public Types

typedef Diades::Utils::Exception< NodeDataException
 
typedef vector< NodeData * >::size_type SizeType
 
typedef vector< Node >::size_type NodeId
 

Public Member Functions

 NodeData ()
 
 ~NodeData ()
 
bool isValid () const
 
list< Edge >::iterator delInEdge (EdgeData *eData)
 
list< Edge >::iterator delOutEdge (EdgeData *eData)
 
list< Edge >::iterator newInEdge (EdgeData *eData)
 
list< Edge >::iterator newOutEdge (EdgeData *eData)
 
const Graphowner () const
 
void setOwner (Graph &newOwner)
 
SizeType outEdgesNb () const
 
SizeType inEdgesNb () const
 
list< Edge > & inEdges () const
 
list< Edge > & outEdges () const
 
NodeId identifier () const
 
void setIdentifier (NodeId newId)
 

Static Public Member Functions

static string typeName ()
 

Private Attributes

Graph_owner
 
NodeId _identifier
 the graph that owns the NodeData (if valid) More...
 
list< Edge_inEdges
 the identifier of the Node More...
 
list< Edge_outEdges
 list of the input edges More...
 
SizeType _inEdgesNb
 list of the output edges More...
 
SizeType _outEdgesNb
 number of input edges (list.size not constant??) More...
 

Friends

class Edge
 number of output edges (list.size not constant??) More...
 

Detailed Description

Data of a Node. A Node is a reference to a NodeData. The NodeData structure is allocated and managed in the Graph. The user do not have to use this class explicitly.

Author
Y. Pencolé
Version
1.0

Definition at line 25 of file NodeData.hh.

Member Typedef Documentation

◆ Exception

typedef Diades::Utils::Exception<NodeData> Diades::Graph::NodeData::Exception

Definition at line 31 of file NodeData.hh.

◆ NodeId

typedef vector<Node>::size_type Diades::Graph::NodeData::NodeId

Definition at line 35 of file NodeData.hh.

◆ SizeType

typedef vector<NodeData *>::size_type Diades::Graph::NodeData::SizeType

Definition at line 34 of file NodeData.hh.

Constructor & Destructor Documentation

◆ NodeData()

Diades::Graph::NodeData::NodeData ( )
inline

Default constructor

Definition at line 41 of file NodeData.hh.

◆ ~NodeData()

Diades::Graph::NodeData::~NodeData ( )
inline

Destructor

Definition at line 51 of file NodeData.hh.

Member Function Documentation

◆ delInEdge()

list<Edge>::iterator Diades::Graph::NodeData::delInEdge ( EdgeData eData)
inline
Parameters
eDatathe input edge to delete
Returns
the iterator that followed the one that is erased

Definition at line 67 of file NodeData.hh.

References _inEdges, _inEdgesNb, Diades::Graph::EdgeData::_targetPos, and require.

Referenced by Diades::Graph::Edge::destroy().

◆ delOutEdge()

list<Edge>::iterator Diades::Graph::NodeData::delOutEdge ( EdgeData eData)
inline
Parameters
eDatathe output edge to delete
Returns
the iterator that followed the one that is erased

Definition at line 82 of file NodeData.hh.

References _outEdges, _outEdgesNb, Diades::Graph::EdgeData::_sourcePos, newInEdge(), newOutEdge(), owner(), require, and setOwner().

Referenced by Diades::Graph::Edge::destroy().

◆ identifier()

NodeId Diades::Graph::NodeData::identifier ( ) const
inline
Returns
the id of the Node that NodeData implements

Definition at line 155 of file NodeData.hh.

References _identifier.

Referenced by Diades::Graph::Node::id(), Diades::Graph::Graph::source(), and Diades::Graph::Graph::sourceRef().

◆ inEdges()

list<Edge>& Diades::Graph::NodeData::inEdges ( ) const
inline
Returns
the list of input edges of the Node that NodeData implements

Definition at line 139 of file NodeData.hh.

References _inEdges.

Referenced by Diades::Graph::Node::destroy(), Diades::Graph::Node::inEdgeBegin(), and Diades::Graph::Node::inEdgeEnd().

◆ inEdgesNb()

SizeType Diades::Graph::NodeData::inEdgesNb ( ) const
inline
Returns
the number of input edges

Definition at line 131 of file NodeData.hh.

References _inEdgesNb.

Referenced by Diades::Graph::Node::inDeg().

◆ isValid()

bool Diades::Graph::NodeData::isValid ( ) const
inline
Returns
true if NodeData is valid (has non-null owner)

Definition at line 57 of file NodeData.hh.

References _owner.

Referenced by Diades::Graph::Node::valid().

◆ newInEdge()

list< Edge >::iterator Diades::Graph::NodeData::newInEdge ( EdgeData eData)
inline
Parameters
eDatathe new input edge to add
Returns
an iterator on the position of this new input edge

Definition at line 294 of file Edge.hh.

References Diades::Graph::Edge::Edge().

Referenced by Diades::Graph::Edge::changeTarget(), Diades::Graph::Edge::create(), and delOutEdge().

◆ newOutEdge()

list< Edge >::iterator Diades::Graph::NodeData::newOutEdge ( EdgeData eData)
inline
Parameters
eDatathe new output edge to add
Returns
an iterator on the position of this new output edge

Definition at line 306 of file Edge.hh.

References Diades::Graph::Edge::Edge().

Referenced by Diades::Graph::Edge::changeSource(), Diades::Graph::Edge::create(), and delOutEdge().

◆ outEdges()

list<Edge>& Diades::Graph::NodeData::outEdges ( ) const
inline
Returns
the list of output edges of the Node that NodeData implements

Definition at line 147 of file NodeData.hh.

References _outEdges.

Referenced by Diades::Graph::Node::destroy(), Diades::Graph::Node::outEdgeBegin(), and Diades::Graph::Node::outEdgeEnd().

◆ outEdgesNb()

SizeType Diades::Graph::NodeData::outEdgesNb ( ) const
inline
Returns
the numbler of output edges

Definition at line 123 of file NodeData.hh.

References _outEdgesNb.

Referenced by Diades::Graph::Node::outDeg().

◆ owner()

const Graph & Diades::Graph::NodeData::owner ( ) const
inline

◆ setIdentifier()

void Diades::Graph::NodeData::setIdentifier ( NodeId  newId)
inline
Parameters
newIdthe id of the Node to implement

Definition at line 163 of file NodeData.hh.

References _identifier.

Referenced by Diades::Graph::Node::changeId(), and Diades::Graph::Node::create().

◆ setOwner()

void Diades::Graph::NodeData::setOwner ( Graph newOwner)
inline
Parameters
newOwnerthe owner of the NodeData (where it is stored)

Owner of a node

Returns
a pointer to the Graph which contains the current State, 0 if not valid.

Definition at line 39 of file NodeImpl.hh.

Referenced by Diades::Graph::Node::create(), and delOutEdge().

◆ typeName()

static string Diades::Graph::NodeData::typeName ( )
inlinestatic

Definition at line 28 of file NodeData.hh.

Friends And Related Function Documentation

◆ Edge

friend class Edge
friend

number of output edges (list.size not constant??)

Definition at line 174 of file NodeData.hh.

Member Data Documentation

◆ _identifier

NodeId Diades::Graph::NodeData::_identifier
private

the graph that owns the NodeData (if valid)

Definition at line 168 of file NodeData.hh.

Referenced by identifier(), and setIdentifier().

◆ _inEdges

list<Edge> Diades::Graph::NodeData::_inEdges
mutableprivate

the identifier of the Node

Definition at line 169 of file NodeData.hh.

Referenced by delInEdge(), and inEdges().

◆ _inEdgesNb

SizeType Diades::Graph::NodeData::_inEdgesNb
private

list of the output edges

Definition at line 171 of file NodeData.hh.

Referenced by delInEdge(), and inEdgesNb().

◆ _outEdges

list<Edge> Diades::Graph::NodeData::_outEdges
mutableprivate

list of the input edges

Definition at line 170 of file NodeData.hh.

Referenced by delOutEdge(), and outEdges().

◆ _outEdgesNb

SizeType Diades::Graph::NodeData::_outEdgesNb
private

number of input edges (list.size not constant??)

Definition at line 172 of file NodeData.hh.

Referenced by delOutEdge(), and outEdgesNb().

◆ _owner

Graph* Diades::Graph::NodeData::_owner
private

Definition at line 167 of file NodeData.hh.

Referenced by isValid().


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