Represents areference to a standalone port.
More...
#include <ScalarPortReference.hpp>
Represents areference to a standalone port.
The ScalarPortReference class represents a reference to a a standalone port object.
Definition at line 41 of file ScalarPortReference.hpp.
A signal to indicate that a new connection has been made
Definition at line 57 of file Connectable.hpp.
A connection between a net and this object
Definition at line 52 of file Connectable.hpp.
A signal to indicate that a connection has been removed
Definition at line 62 of file Connectable.hpp.
List of Shared Pointers to objects of type Type
Definition at line 61 of file Composite.hpp.
Shared Pointer to object of type Type
Definition at line 55 of file Composite.hpp.
torc::generic::ScalarPortReference::~ScalarPortReference |
( |
| ) |
|
throw | ( | |
| ) | | |
torc::generic::ScalarPortReference::ScalarPortReference |
( |
| ) |
|
|
protected |
void torc::generic::ScalarPortReference::accept |
( |
BaseVisitor & |
inoutVisitor | ) |
|
throw | ( | Error |
| ) | | |
|
virtual |
template<typename _Action >
void torc::generic::PropertyContainer::applyOnAllProperties |
( |
const _Action & |
action | ) |
|
throw | ( | Error |
| ) | | |
|
inlineinherited |
Apply action on all properties.
- Parameters
-
[in] | action | Action to be applied |
Definition at line 113 of file PropertyContainer.hpp.
118 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
void applyOnAll(const _Action &action)
SymTab< std::string, PropertySharedPtr > mProperties
void torc::generic::PortReference::bindToMasterPort |
( |
const PortSharedPtr & |
inMaster | ) |
|
throw | ( | Error |
| ) | | |
|
virtualinherited |
- Exceptions
-
Error | Pointer to the Net object does not exists
-
Id : eMessageIdErrorPointerToItemDoesNotExist
-
Context Data
|
Error | Net size does not match with scalar port reference size
-
Id : eMessageIdErrorItemSizeMismatch
-
Context Data
-
Net Size - SizeType
-
Scalar port reference Size - SizeType
|
Implements torc::generic::Connectable.
Definition at line 74 of file ScalarPortReference.cpp.
77 e.saveContextData(
"Pointer to the Net object does not exist", inNet);
80 if(inNet->getSize() !=
getSize()) {
82 e.saveContextData(
"Net Size", inNet->getSize());
83 e.saveContextData(
"Scalar port reference Size",
getSize());
88 ConnectionHandler handler(inNet);
92 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
virtual Connection connect(const NetSharedPtr &inNet)=0
std::list< NetSharedPtr >::iterator Connection
virtual SizeType getSize() const
Pointer getSharedThis() const
void torc::generic::ScalarPortReference::disconnect |
( |
const Connection & |
inConnection | ) |
|
throw | ( | Error |
| ) | | |
|
virtual |
Implements torc::generic::Connectable.
Definition at line 98 of file ScalarPortReference.cpp.
102 e.saveContextData(
"Net is invalid", connNet);
106 ConnectionHandler handler(connNet);
110 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
virtual void disconnect()
boost::shared_ptr< Net > NetSharedPtr
Pointer getSharedThis() const
void torc::generic::Connectable::disconnect |
( |
const std::string & |
inName | ) |
|
throw | ( | Error |
| ) | | |
|
inherited |
Disconnect the named Net from this object.
- Note
- This metod can be overridden by derived classes. However, the method must call the on_connected() method after this. The sigConnected_ signal must also be invoked in the overriding method.
- Parameters
-
[in] | inName | Name of the net to be Disconnected |
- Exceptions
-
Error | Provided net was not found |
Disconnect the named Net from this object.
- Note
- This metod can be overridden by derived classes. However, the method must call the on_connected() method after this. The sigConnected_ signal must also be invoked in the overriding method.
- Parameters
-
[in] | inNname | Name of the net to be Disconnected |
- Exceptions
-
Error | Provided net was not found |
Definition at line 111 of file Connectable.cpp.
113 boost::bind<bool>(std::equal_to<std::string>(),
114 boost::bind(boost::mem_fn(&
Net::getName), _1), inName)));
std::list< NetSharedPtr > mConnectedNets
virtual void disconnect()
virtual const std::string getName() const
void torc::generic::Connectable::disconnect |
( |
const NetSharedPtr & |
inNet | ) |
|
throw | ( | Error |
| ) | | |
|
inherited |
Disconnect the given Net from this object.
- Note
- This metod can be overridden by derived classes. However, the method must call the on_disconnected() method after this. The sigDisconnected_ signal must also be invoked in the overriding method.
- Parameters
-
- Exceptions
-
Error | Provided net was not found |
Disconnect the given Net from this object.
- Note
- This metod can be overridden by derived classes. However, the method must call the on_disconnected() method after this. The sigDisconnected_ signal must also be invoked in the overriding method.
- Parameters
-
[in] | inNet | Pointer to a net |
- Exceptions
-
Error | Provided net was not found |
Definition at line 128 of file Connectable.cpp.
std::list< NetSharedPtr > mConnectedNets
virtual void disconnect()
void torc::generic::Connectable::disconnect |
( |
| ) |
|
throw | ( | Error |
| ) | | |
|
virtualinherited |
Disconnect all connections to this port.
Reimplemented in torc::generic::Net, torc::generic::VectorNet, and torc::generic::NetBundle.
Definition at line 132 of file Connectable.cpp.
133 log(
"Disconnecting all\n");
134 std::vector<NetSharedPtr> nets;
136 for(std::vector<NetSharedPtr>::iterator it = nets.begin(); it != nets.end(); ++it) {
void log(const char *fmt,...)
virtual void disconnect()
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
Get a specific member of this composition.
- Parameters
-
[in] | indices | A list of indices to be accessed. The number of indices must be equal to the number of dimensions. |
- Returns
- An empty pointer is returned
Implements torc::generic::Composite< PortReference >.
Get the attributes of the port. Attributes include dcFaninLoad, dcFanoutLoad_ etc.
- Returns
- Pointer to PortAttributes object.
Definition at line 123 of file PortReference.hpp.
PortAttributesSharedPtr mAttributes
Get children of this composition.
- Parameters
-
[out] | outChildren | A list of all children for this composition |
- Note
- This wil return empty list for scalar
Get children of this composition.
- Parameters
-
[out] | outChildren | A list of all children for this composition |
Implements torc::generic::Composite< PortReference >.
void torc::generic::Connectable::getConnectedNets |
( |
std::vector< NetSharedPtr > & |
outNets, |
|
|
bool |
inSkipChildConnections = false |
|
) |
| const |
throw | ( | Error |
| ) | | |
|
virtualinherited |
Get the master(referred) port.
- Returns
- The master port.
Definition at line 114 of file PortReference.hpp.
std::string torc::generic::PortReference::getName |
( |
void |
| ) |
|
|
inherited |
Get name of port-ref. This will return the same name as the master.
- Returns
- Name of the master if master is set. Otherwise returns empty string.
Definition at line 52 of file PortReference.cpp.
Get a pointer to the parent object
- Returns
- Pointer to parent
Get a pointer to the parent collection
- Returns
- A pointer to the parent collection if present, empty pointer otherwise
void torc::generic::PropertyContainer::getProperties |
( |
std::map< std::string, PropertySharedPtr > & |
outProperties | ) |
const |
|
inlineinherited |
Get the map of all properties
- Parameters
-
[out] | outProperties | The map of properties |
Get the map of all properties
- Returns
- The map of properties
Definition at line 107 of file PropertyContainer.hpp.
void getValueMap(UserMap &outMap) const
SymTab< std::string, PropertySharedPtr > mProperties
PropertySharedPtr torc::generic::PropertyContainer::getProperty |
( |
const std::string & |
inName | ) |
|
|
inherited |
Get a property
- Parameters
-
[in] | inName | Name of the property to be retreived |
- Returns
- Pointer to the property object if present, empty pointer otherwise.
Get a property
- Parameters
-
[in] | name | Name of the property to be retreived |
- Returns
- Pointer to the property object if present, empty pointer otherwise.
Definition at line 37 of file PropertyContainer.cpp.
bool get(const KeyType &inKey, ValueType &outValue) const
SymTab< std::string, PropertySharedPtr > mProperties
boost::shared_ptr< Property > PropertySharedPtr
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
- Returns
- A shared pointer to this object
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
- Parameters
-
[out] | ptr | Set to a shared pointer to this object |
void torc::generic::Connectable::onConnect |
( |
| ) |
|
throw | ( | Error |
| ) | | |
|
protectedvirtualinherited |
A polymorphic function that is called after a net is Connected to this object
Definition at line 144 of file Connectable.cpp.
void torc::generic::Connectable::onDisconnect |
( |
| ) |
|
throw | ( | Error |
| ) | | |
|
protectedvirtualinherited |
A polymorphic function that is called after a net is Disconnected from this object
Definition at line 149 of file Connectable.cpp.
Set the attributes of the port. Attributes include dcFaninLoad, dcFanoutLoad_ etc.
- Note
- This method does not check whether prior set of properties exist or not. Newly set property will remove old properties.
- Parameters
-
Definition at line 49 of file PortReference.cpp.
PortAttributesSharedPtr mAttributes
Set a pointer to the parent
- Parameters
-
[in] | inSource | Set a pointer to the parent |
Set a pointer to a parnt composition.
- Parameters
-
[in] | inParentCollection | pointer to the parent collection (Vector/Bundle) |
Set a pointer to a parnt composition.
- Parameters
-
[in] | parentCollection | pointer to the parent collection (Vector/Bundle) |
void torc::generic::PropertyContainer::setProperties |
( |
const std::map< std::string, PropertySharedPtr > & |
inSource | ) |
|
|
inherited |
Set the map of properties
- Parameters
-
[in] | inSource | The map of properties |
Definition at line 66 of file PropertyContainer.cpp.
67 std::map<std::string, PropertySharedPtr>::const_iterator it = inSource.begin();
68 for(; it != inSource.end(); it++) {
bool setProperty(const std::string &inName, const PropertySharedPtr &inProperty)
bool torc::generic::PropertyContainer::setProperty |
( |
const std::string & |
inName, |
|
|
const PropertySharedPtr & |
inProperty |
|
) |
| |
|
inherited |
Save the inSource of a property
- Parameters
-
[in] | inName | Name of the property to be saved |
[in] | inProperty | Pointer to the property object if present, empty pointer otherwise. |
- Returns
- bool True if saved, false otherwise.
Save the inSource of a property
- Parameters
-
[in] | inName | Name of the property to be saved |
[in] | inPoperty | Pointer to the property object if present, empty pointer otherwise. |
- Returns
- bool True if saved, false otherwise.
Definition at line 53 of file PropertyContainer.cpp.
bool set(const KeyType &inKey, const ValueType &inValue)
SymTab< std::string, PropertySharedPtr > mProperties
Set a weak pointer to this object. This will be used later to get a shared pointer to this object from within other member methods if required. This should be called by the Factory creating the object.
- Parameters
-
[in] | weakThis | A weak pointer to this object |
A signal to indicate that a new connection has been made
Definition at line 167 of file Connectable.hpp.
Connected mSigNetConnected
A signal to indicate that a new connection has been made
Definition at line 174 of file Connectable.hpp.
Disconnected mSigNetDisconnected
The documentation for this class was generated from the following files: