Represents a reference to a bit of a port.
More...
#include <VectorPortBitReference.hpp>
Represents a reference to a bit of a port.
The VectorPortBitReference class represents a reference to a bit of an array port.
Definition at line 41 of file VectorPortBitReference.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::VectorPortBitReference::VectorPortBitReference |
( |
| ) |
|
torc::generic::VectorPortBitReference::~VectorPortBitReference |
( |
| ) |
|
throw | ( | |
| ) | | |
|
virtual |
void torc::generic::VectorPortBitReference::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 |
Implements torc::generic::Connectable.
Definition at line 47 of file VectorPortBitReference.cpp.
50 e.saveContextData(
"Pointer to the Net object does not exist", inNet);
53 if(inNet->getSize() !=
getSize()) {
55 e.saveContextData(
"Net Size", inNet->getSize());
56 e.saveContextData(
"Vector Net Size",
getSize());
61 ConnectionHandler handler(inNet);
65 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
virtual Connection connect(const NetSharedPtr &inNet)=0
virtual SizeType getSize() const
std::list< NetSharedPtr >::iterator Connection
Pointer getSharedThis() const
void torc::generic::VectorPortBitReference::disconnect |
( |
const Connection & |
inConnection | ) |
|
throw | ( | Error |
| ) | | |
|
virtual |
Implements torc::generic::Connectable.
Definition at line 71 of file VectorPortBitReference.cpp.
75 e.saveContextData(
"Pointer to the Net object does not exist", connNet);
79 ConnectionHandler handler(connNet);
83 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] | inIndices | 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
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 >.
Get composition type for this object
- Returns
- The CompositionType inSource eCompositionTypeVectorBit is returned
Get composition type for this object
- Returns
- The CompositionType inSource eCompositionTypeScalar is returned
Implements torc::generic::Composite< PortReference >.
void torc::generic::VectorPortBitReference::getConnectedNets |
( |
std::vector< NetSharedPtr > & |
outNets, |
|
|
bool |
inSkipChildConnections = false |
|
) |
| const |
throw | ( | Error |
| ) | | |
|
virtual |
Reimplemented from torc::generic::Connectable.
Definition at line 89 of file VectorPortBitReference.cpp.
94 if(!inSkipChildConnections) {
100 e.saveContextData(
"Pointer to parent collection does not exist", parent);
105 e.saveContextData(
"Composition type mismatch", parent->getCompositionType());
109 parent->getConnectedNets(parentConnections,
true);
110 VectorBit<Net>::List::iterator connNet = parentConnections.begin();
111 VectorBit<Net>::List::iterator connNetEnd = parentConnections.end();
112 const std::vector<VectorBit<Net>::SizeType>& myIndex =
getIndices();
113 for(; connNet != connNetEnd; ++connNet) {
116 cousin = (*connNet)->get(myIndex);
119 (*connNet)->getChildren(bChildren);
124 e.saveContextData(
"Pointer to item does not exist", cousin);
127 outNets.push_back(cousin);
SizeType getAbsoluteIndex() const
boost::shared_ptr< Type > Pointer
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
virtual Pointer getParentCollection() const
const std::vector< SizeType > & getIndices() const
Get the index of this bit in the vector.
- Returns
- A vector containing the indices to which this element belonged.
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 the index of this bit in the vector.
- Parameters
-
[in] | inSource | A vector of indices for this element |
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: