YMLNetwork Class Reference

#include <ymlnetwork.h>

Inheritance diagram for YMLNetwork:

Inheritance graph
[legend]
Collaboration diagram for YMLNetwork:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 YMLNetwork ()
virtual ~YMLNetwork ()
void addLink (YMLLink *link)
int getNumLinks ()
YMLLinkgetLink (int i)
void addNode (YMLNode *node)
YMLNodefindNode (const char *name)
int getNumNodes ()
YMLNodegetNode (int i)
void collectAllNodes (node_list_t &list)
int getNumConnections ()
YMLConnectiongetConnection (int i)
bool connect ()
void createDirectConnections (YMLEntityFactory *factory, YMLPort *source, YMLPortSide *side, int commChannelID)
void createDirectConnections (YMLEntityFactory *factory)
void setTraceContext (TraceContext *traceContext)
TraceContextgetTraceContext ()
virtual void dumpXML (XMLSerializer &stream)
void dumpXMLLinks (XMLSerializer &stream)
void dumpXMLNodes (XMLSerializer &stream)
virtual void dumpDOT (std::ostream &stream, int tabLevel, bool flat=false)
void dumpDOTConnections (std::ostream &stream, int tabLevel, bool flat=false)
void dumpDOTNodes (std::ostream &stream, int tabLevel)
void dumpDOTSubNets (std::ostream &stream, int tabLevel, bool flat=false)
void dumpDOTSubNet (std::ostream &stream, int tabLevel, bool flat=false)
void doFinalizeNodes ()
void doFinalizeLinks ()
void doFinalize ()
ymlentity_t getType ()

Constructor & Destructor Documentation

YMLNetwork::YMLNetwork  ) 
 

YMLNetwork::~YMLNetwork  )  [virtual]
 


Member Function Documentation

void YMLNetwork::addLink YMLLink link  )  [inline]
 

Add a link to the network.

Parameters:
link A pointer to the link.

int YMLNetwork::getNumLinks  )  [inline]
 

Returns:
The number of links currently in this network.

YMLLink* YMLNetwork::getLink int  i  )  [inline]
 

Get a link by id. Ids are from 0 to getNumLinks() - 1.

Parameters:
i The link id.
Returns:
A pointer to the YMLLink.

void YMLNetwork::addNode YMLNode node  ) 
 

Add a node to this network. If the node name is already in use the function will throw a BasicException

Parameters:
node The node to add.

YMLNode* YMLNetwork::findNode const char *  name  )  [inline]
 

Find a YMLNode by name.

Parameters:
name The node name.
Returns:
A pointer to the YMLNode on success, NULL otherwise.

int YMLNetwork::getNumNodes  )  [inline]
 

Returns:
The number of nodes in this network. Does not include grandchildren.

YMLNode* YMLNetwork::getNode int  i  )  [inline]
 

Get a node by id. Ids are from 0 to getNumNodes() - 1.

Parameters:
i The node id.
Returns:
A pointer to the node.

void YMLNetwork::collectAllNodes node_list_t list  ) 
 

Copy all of the nodes in this network and sub-networks in order in to the provided list.

Parameters:
list The list of collected nodes.

int YMLNetwork::getNumConnections  )  [inline]
 

Returns:
The number of connections in this network.

YMLConnection* YMLNetwork::getConnection int  i  )  [inline]
 

Get a connection by id. Ids are from 0 to getNumConnections() - 1.

Parameters:
i The connection id.
Returns:
A pointer to the YMLConnection.

bool YMLNetwork::connect  ) 
 

Connected links and check directions and types.

Returns:
true on success, false otherwise.

void YMLNetwork::createDirectConnections YMLEntityFactory factory,
YMLPort source,
YMLPortSide side,
int  commChannelID
 

Connect port to ports with direct connections. This function bypasses YMLLinks with YMLConnections. Starting from side createDirectConnections branches out recursively until it hits a YMLNode. When an node is encountered a YMLConnection is created between it and the source port.

Parameters:
factory The YMLEntityFactory to use for createing YMLConnections.
source The source port.
side The port side pointer indicating the direction to branch out.

void YMLNetwork::createDirectConnections YMLEntityFactory factory  ) 
 

Create direct connections for all of the connections originating in this network.

Parameters:
factory The YMLEntityFactory to use for creating YMLConnections.

void YMLNetwork::setTraceContext TraceContext traceContext  )  [inline]
 

TraceContext* YMLNetwork::getTraceContext  )  [inline]
 

void YMLNetwork::dumpXML XMLSerializer &  stream  )  [virtual]
 

Print this network as XML.

Parameters:
stream The output stream.

Reimplemented from YMLNode.

void YMLNetwork::dumpXMLLinks XMLSerializer &  stream  ) 
 

Print this networks links as XML.

Parameters:
stream The output stream.

void YMLNetwork::dumpXMLNodes XMLSerializer &  stream  ) 
 

Print this networks nodes as XML.

Parameters:
stream The output stream.

void YMLNetwork::dumpDOT std::ostream &  stream,
int  tabLevel,
bool  flat = false
[virtual]
 

Print this network as a GraphViz dot graph.

Parameters:
stream The output stream.
tabLevel The number of tabs to use.
flat If true do not recur to sub networks.

void YMLNetwork::dumpDOTConnections std::ostream &  stream,
int  tabLevel,
bool  flat = false
 

Print this networks connections as a GraphViz dot graph.

Parameters:
stream The output stream.
tabLevel The number of tabs to use.
flat If true do not print connections that extend outside of this network.

void YMLNetwork::dumpDOTNodes std::ostream &  stream,
int  tabLevel
 

Print this networks nodes as a GraphViz dot graph.

Parameters:
stream The output stream.
tabLevel The number of tabs to use.

void YMLNetwork::dumpDOTSubNets std::ostream &  stream,
int  tabLevel,
bool  flat = false
 

Print this networks subnetworks as a GraphViz dot graph.

Parameters:
stream The output stream.
tabLevel The number of tabs to use.
flat If true subnetworks should only print one level deep.

void YMLNetwork::dumpDOTSubNet std::ostream &  stream,
int  tabLevel,
bool  flat = false
 

Print this networks subnets as a GraphViz dot graph.

Parameters:
stream The output stream.
tabLevel The number of tabs to use.
flat If true do not recur to sub networks and print them as normal nodes.

void YMLNetwork::doFinalizeNodes  ) 
 

Call finalize on all nodes.

void YMLNetwork::doFinalizeLinks  ) 
 

Call finalize on all links.

void YMLNetwork::doFinalize  )  [virtual]
 

Call doFinalizeNodes(), doFinalizeLinks(), doFinalizePorts(), then finalize().

Reimplemented from YMLNode.

ymlentity_t YMLNetwork::getType  )  [inline, virtual]
 

Get the YMLEntity type.

Returns:
ymlNetwork.

Reimplemented from YMLNode.


The documentation for this class was generated from the following files:
Generated on Wed Apr 5 21:05:52 2006 for Sesame by  doxygen 1.4.6