torc::generic::Net Class Reference

Represents an EDIF Net. More...

#include <Net.hpp>

Inheritance diagram for torc::generic::Net:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::Net:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void addSubnet (const NetSharedPtr &inSubnet) throw (Error)
NetSharedPtr findSubnet (const std::string &inName) throw (Error)
void removeSubnet (const std::string &inName) throw (Error)
void getSubnets (std::vector< NetSharedPtr > &outSubnets) const throw ()
void setSubnets (const std::vector< NetSharedPtr > &inSource) throw (Error)
template<typename _Action>
void applyOnAllSubnets (const _Action &action) throw (Error)
NetSharedPtr getParentNet () const throw ()
void setParentNet (const NetSharedPtr &inParent) throw ()
const NetAttributesSharedPtr getAttributes () const throw ()
void setAttributes (const NetAttributesSharedPtr &inSource) throw ()
PortSharedPtr findConnectedPort (const std::string &inName) throw (Error)
virtual void getConnectedPorts (std::vector< PortSharedPtr > &outPort, bool inSkipChildConnections=false) const throw ()
template<typename _Action>
void applyOnAllConnectedPorts (const _Action &action) throw (Error)
virtual void getConnectedPortLists (std::vector< PortListSharedPtr > &outPortList) const throw ()
template<typename _Action>
void applyOnAllConnectedPortLists (const _Action &action) throw (Error)
virtual void disconnect () throw (Error)
PortReferenceSharedPtr findConnectedPortReference (const std::string &inName) throw (Error)
virtual void getConnectedPortRefs (std::vector< PortReferenceSharedPtr > &outPortRefs, bool inSkipChildConnections=false) const throw ()
template<typename _Action>
void applyOnAllConnectedPortRefs (const _Action &action) throw (Error)

Protected Member Functions

void addConnectedPort (const PortSharedPtr &inPort) throw (Error)
void removeConnectedPort (const PortSharedPtr &inPort) throw (Error)
void addConnectedPortList (const PortListSharedPtr &inPort) throw (Error)
void removeConnectedPortList (const PortListSharedPtr &inList) throw (Error)
void setConnectedPorts (const std::vector< PortSharedPtr > &inSource) throw (Error)
void addConnectedPortReference (const PortReferenceSharedPtr &portRef) throw (Error)
void removeConnectedPortReference (const PortReferenceSharedPtr &inPortRef) throw (Error)
void setConnectedPortRefs (const std::vector< PortReferenceSharedPtr > &inSource) throw (Error)

Private Member Functions

 Net (const Net &source) throw ()
Netoperator= (const Net &source) throw ()

Private Attributes

SymTab< std::string,
NetSharedPtr, true > 
mSubnets
std::list< PortSharedPtr > mConnectedPorts
std::list< PortListSharedPtr > mConnectedPortLists
std::list< PortReferenceSharedPtr > mConnectedPortRefs
NetSharedPtr mParentNet
NetAttributesSharedPtr mAttributes

Friends

class ConnectionHandler


Detailed Description

Represents an EDIF Net.

The Net class is an interface to EDIF nets. Net is an interface for scalar nets , vector nets , vector nets bits and net bundles. This class provides a simplified view of all three types of nets. To get a handle to an actual net, the client will have to use a Visitor with proper overloads of the visit() function, or dynamic_cast can be used. The latter method is however not recommended. A net object supports storing properties for storing different EDIF properties. See documentation of the Property and PropertyContainer classes for more details.

Definition at line 56 of file Net.hpp.


Member Function Documentation

void torc::generic::Net::addSubnet ( const NetSharedPtr &  inSubnet  )  throw (Error)

Add a subnet to this net.

Parameters:
[in] inSubnet Subnet to be added
Exceptions:
Error Could not add subnet, because subnet name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Subnet name - String
Error Could not add subnet, because subnet name is already exists
  • Id : eMessageIdErrorItemAlreadyExists
  • Context Data
    • Subnet name - String
Add a subnet to this net.

Parameters:
[in] inSubnet Subnet to be added
Exceptions:
Error Could not add subnet, because subnet name is empty
Error Could not add subnet, because subnet name is already exists

Definition at line 81 of file Net.cpp.

NetSharedPtr torc::generic::Net::findSubnet ( const std::string &  inName  )  throw (Error)

Find a subnet from belonging to this net.

Parameters:
[in] inName Name of the subnet. If not found, empty pointer is returned

Definition at line 109 of file Net.cpp.

void torc::generic::Net::removeSubnet ( const std::string &  inName  )  throw (Error)

Remove a subnet from this net.

Parameters:
inName Name of the object to be delete
Exceptions:
Error Could not remove subnet, because subnet name is empty
  • Id : eMessageIdErrorEmptyItemName
  • Context Data
    • Subnet name - String
Error Could not remove subnet, because subnet not present.
  • Id : eMessageIdErrorItemNotFound
  • Context Data
    • Subnet name - String
Remove a subnet from this net.

Parameters:
inName Name of the object to be delete
Exceptions:
Error Could not remove subnet, because subnet name is empty
Error Could not remove subnet, because subnet not present.

Definition at line 124 of file Net.cpp.

template<typename _Action>
void torc::generic::Net::applyOnAllSubnets ( const _Action &  action  )  throw (Error) [inline]

Apply action on all Subnets.

Parameters:
[in] action Action to be applied

Definition at line 342 of file Net.hpp.

const NetAttributesSharedPtr torc::generic::Net::getAttributes (  )  const throw () [inline]

Get the attributes of the net. Attributes include criticality, netDelay etc.

Returns:
Pointer to NetAttributes object.

Definition at line 366 of file Net.hpp.

void torc::generic::Net::setAttributes ( const NetAttributesSharedPtr &  inSource  )  throw ()

Set the attributes of the net. Attributes include criticality, netDelay etc.

Parameters:
[in] inSource Pointer to NetAttributes object.

Definition at line 153 of file Net.cpp.

void torc::generic::Net::addConnectedPort ( const PortSharedPtr &  inPort  )  throw (Error) [protected]

Connect a port to this net.

Parameters:
[in] inPort port to be added. Empty pointer is ignored.
Exceptions:
Error Could not add Port, because Port name is empty
Error Could not add Port, because Port name is already exists

Definition at line 189 of file Net.cpp.

PortSharedPtr torc::generic::Net::findConnectedPort ( const std::string &  inName  )  throw (Error)

Find a port connected to this net.

Parameters:
[in] inName Name of the port. If not found, empty pointer is returned

Definition at line 213 of file Net.cpp.

void torc::generic::Net::getConnectedPorts ( std::vector< PortSharedPtr > &  outPort,
bool  inSkipChildConnections = false 
) const throw () [virtual]

Appends vector of connected ports

Parameters:
[in] outPort vector of port to be appended to
[in] inSkipChildConnections Return only ports connected to this port and skip returning elements that have been connected to the child

Reimplemented in torc::generic::VectorNet, and torc::generic::VectorNetBit.

Definition at line 228 of file Net.cpp.

template<typename _Action>
void torc::generic::Net::applyOnAllConnectedPorts ( const _Action &  action  )  throw (Error) [inline]

Apply action on all connected ports.

Parameters:
[in] action Action to be applied

Definition at line 372 of file Net.hpp.

void torc::generic::Net::getConnectedPortLists ( std::vector< PortListSharedPtr > &  outPortList  )  const throw () [virtual]

Appends vector of connected port lists

Parameters:
[in] outPortList vector of port lists to be appended to

Definition at line 281 of file Net.cpp.

template<typename _Action>
void torc::generic::Net::applyOnAllConnectedPortLists ( const _Action &  action  )  throw (Error) [inline]

Apply action on all connected port lists.

Parameters:
[in] action Action to be applied

Definition at line 388 of file Net.hpp.

void torc::generic::Net::disconnect (  )  throw (Error) [virtual]

Disconnect all connections to this port.

Reimplemented from torc::generic::Connectable.

Reimplemented in torc::generic::NetBundle, and torc::generic::VectorNet.

Definition at line 420 of file Net.cpp.

void torc::generic::Net::addConnectedPortReference ( const PortReferenceSharedPtr &  inPortRef  )  throw (Error) [protected]

Connect a port reference to this net.

Parameters:
[in] inPortRef Port reference to be added
Exceptions:
Error Could not add port reference

Definition at line 329 of file Net.cpp.

PortReferenceSharedPtr torc::generic::Net::findConnectedPortReference ( const std::string &  inName  )  throw (Error)

Find a port reference connected to this net.

Parameters:
[in] inName Name of the port reference. If not found, empty pointer is returned

Definition at line 353 of file Net.cpp.

void torc::generic::Net::getConnectedPortRefs ( std::vector< PortReferenceSharedPtr > &  outPortRefs,
bool  inSkipChildConnections = false 
) const throw () [virtual]

Appends vector of connected port references

Parameters:
[in] outPortRefs vector of port refs to be appended to

Reimplemented in torc::generic::VectorNet, and torc::generic::VectorNetBit.

Definition at line 371 of file Net.cpp.

template<typename _Action>
void torc::generic::Net::applyOnAllConnectedPortRefs ( const _Action &  action  )  throw (Error) [inline]

Apply action on all connected port refs.

Parameters:
[in] action Action to be applied

Definition at line 404 of file Net.hpp.


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

Generated on Thu Oct 13 16:50:10 2011 for TORC by  doxygen 1.5.6