torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::VectorPortReference Class Referenceabstract

Represents a reference to a port array. More...

#include <VectorPortReference.hpp>

+ Inheritance diagram for torc::generic::VectorPortReference:
+ Collaboration diagram for torc::generic::VectorPortReference:

Data Structures

class  Factory
 

Public Types

typedef Vector< PortReference,
VectorPortBitReference,
VectorPortBitReference::Factory,
true > 
BaseType
 
typedef VisitorType
< VectorPortReference
Visitor
 
typedef std::list
< NetSharedPtr >::iterator 
Connection
 
typedef
boost::signals2::signal< void(const
NetSharedPtr &)> 
Connected
 
typedef
boost::signals2::signal< void(const
NetSharedPtr &)> 
Disconnected
 
typedef PortReference Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 
typedef std::vector< PointerList
 
typedef size_t SizeType
 
typedef BaseType::Type Type
 
typedef BaseType::List List
 
typedef BaseType::Pointer Pointer
 
typedef BaseType::SizeType SizeType
 
typedef VectorPortBitReference ChildType
 
typedef boost::shared_ptr
< ChildType
ChildPointer
 
typedef
VectorPortBitReference::Factory 
ChildFactory
 
typedef boost::shared_ptr
< VectorPortBitReference::Factory
ChildFactorySharedPtr
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
virtual void setParent (const InstanceSharedPtr &inParent)
 
virtual Connectable::Connection connect (const NetSharedPtr &inNet) throw (Error)
 
void disconnect (const Connectable::Connection &inConnection) throw (Error)
 
virtual void getConnectedNets (std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const throw (Error)
 
virtual void onChildCreate (const VectorPortBitReferenceSharedPtr &inCreatedChild) const throw (Error)
 
virtual void bindToMasterPort (const PortSharedPtr &inMaster) throw (Error)
 
 ~VectorPortReference () throw ()
 
PortSharedPtr getMaster () const
 
const PortAttributesSharedPtr getAttributes () const
 
void setAttributes (const PortAttributesSharedPtr &inSource)
 
std::string getName ()
 
ConnectedsignalNetConnected ()
 
DisconnectedsignalNetDisconnected ()
 
void disconnect (const std::string &inName) throw (Error)
 
void disconnect (const NetSharedPtr &net) throw (Error)
 
virtual void disconnect () throw (Error)
 
PropertySharedPtr getProperty (const std::string &inName)
 
bool setProperty (const std::string &inName, const PropertySharedPtr &inProperty)
 
void getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const
 
void setProperties (const std::map< std::string, PropertySharedPtr > &inSource)
 
template<typename _Action >
void applyOnAllProperties (const _Action &action) throw (Error)
 
virtual CompositionType getCompositionType () const =0
 
virtual size_t getSize () const =0
 
virtual void getChildren (List &outChildren) const =0 throw (Error)
 
virtual const Pointer get (const std::vector< SizeType > &inIndices) const =0 throw (Error)
 
virtual void setParentCollection (const Pointer &inParentCollection)
 
virtual Pointer getParentCollection () const
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 
const boost::shared_ptr< InstancegetParent () const
 
virtual void setParent (const boost::shared_ptr< Instance > &inSource)
 
virtual CompositionType getCompositionType () const
 
virtual SizeType getSize () const
 
virtual const Pointer get (const std::vector< SizeType > &inIndices) const throw (Error)
 
virtual void getChildren (List &outChildren) const throw (Error)
 
void applyOnAllChildren (const _Action &action) throw (Error)
 
virtual void forceAutoBlast (void) throw (Error)
 
virtual void getCreatedChildren (List &outChildren) const throw (Error)
 
void constructChildren (const boost::shared_ptr< ChildFactory > &inFactory, const std::vector< SizeType > &inLimits) throw (Error)
 
void getLimits (std::vector< SizeType > &outLimits) const
 
bool getIsPreserved () const
 

Protected Member Functions

 VectorPortReference ()
 
virtual void onConnect () throw (Error)
 
virtual void onDisconnect () throw (Error)
 
void setChildren (const List &inSource) throw (Error)
 
virtual void onAutoBlast () const throw (Error)
 
virtual void onChildCreate (const boost::shared_ptr< ChildType > &inCreatedChild) const throw (Error)
 
void setLimits (const std::vector< SizeType > &inSource)
 
const boost::shared_ptr
< ChildFactory
getFactory () const
 
void setFactory (const boost::shared_ptr< ChildFactory > &inSource)
 

Friends

class FactoryType< VectorPortReference >
 

Detailed Description

Represents a reference to a port array.

The VectorPortReference class represents a reference to a port array.

Definition at line 44 of file VectorPortReference.hpp.

Member Typedef Documentation

Definition at line 61 of file Vector.hpp.

typedef boost::signals2::signal<void(const NetSharedPtr&)> torc::generic::Connectable::Connected
inherited

A signal to indicate that a new connection has been made

Definition at line 57 of file Connectable.hpp.

typedef std::list<NetSharedPtr>::iterator torc::generic::Connectable::Connection
inherited

A connection between a net and this object

Definition at line 52 of file Connectable.hpp.

typedef boost::signals2::signal<void(const NetSharedPtr&)> torc::generic::Connectable::Disconnected
inherited

A signal to indicate that a connection has been removed

Definition at line 62 of file Connectable.hpp.

typedef std::vector<Pointer> torc::generic::Composite< PortReference >::List
inherited

List of Shared Pointers to objects of type Type

Definition at line 61 of file Composite.hpp.

typedef boost::shared_ptr<Type> torc::generic::Composite< PortReference >::Pointer
inherited

Shared Pointer to object of type Type

Definition at line 55 of file Composite.hpp.

typedef size_t torc::generic::Composite< PortReference >::SizeType
inherited

Definition at line 62 of file Composite.hpp.

Definition at line 50 of file Composite.hpp.

typedef boost::weak_ptr<Type> torc::generic::Composite< PortReference >::WeakPointer
inherited

Definition at line 56 of file Composite.hpp.

Constructor & Destructor Documentation

torc::generic::VectorPortReference::~VectorPortReference ( )
throw (
)

Definition at line 255 of file VectorPortReference.cpp.

255 {}
torc::generic::VectorPortReference::VectorPortReference ( )
protected

Definition at line 253 of file VectorPortReference.cpp.

253 : PortReference(), BaseType() {}
Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true > BaseType

Member Function Documentation

void torc::generic::VectorPortReference::accept ( BaseVisitor inoutVisitor)
throw (Error
)
virtual

Implements torc::generic::Visitable.

Definition at line 124 of file VectorPortReference.cpp.

124  {
125  try {
126  runVisitor(*this, inoutVisitor);
127  } catch(Error& e) {
128  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
129  throw;
130  }
131 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::applyOnAllChildren ( const _Action &  action)
throw (Error
)
inherited
template<typename _Action >
void torc::generic::PropertyContainer::applyOnAllProperties ( const _Action &  action)
throw (Error
)
inlineinherited

Apply action on all properties.

Parameters
[in]actionAction to be applied

Definition at line 113 of file PropertyContainer.hpp.

114  {
115  try {
116  mProperties.applyOnAll(action);
117  } catch(Error& e) {
118  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
119  throw;
120  }
121 }
void applyOnAll(const _Action &action)
Definition: SymTab.hpp:192
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

void torc::generic::VectorPortReference::bindToMasterPort ( const PortSharedPtr inMaster)
throw (Error
)
virtual

Set master port.

Parameters
[in]inMasterSet the master port.

Set master port.

Parameters
[in]inSourceSet the master port.

Reimplemented from torc::generic::PortReference.

Definition at line 231 of file VectorPortReference.cpp.

231  {
233 
234 }
virtual void bindToMasterPort(const PortSharedPtr &inMaster)

+ Here is the call graph for this function:

Connectable::Connection torc::generic::VectorPortReference::connect ( const NetSharedPtr inNet)
throw (Error
)
virtual

Connect a Net to 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]inNetA pointer to the Net object that needs to be connected
Returns
A connection that has been established. This can be used later for disconnection.
Exceptions
ErrorPointer to the Net object does not exist
  • Id : eMessageIdErrorPointerToItemDoesNotExist
  • Context Data
    • Pointer to the Net - boost::shared_ptr
ErrorNet size does not match with VectorPortReference size

Connect a Net to 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]inNetA pointer to the Net object that eeds to be connected
Returns
A connection that has been established. This can be used later for disconnection.
Exceptions
ErrorPointer to the Net object does not exist
ErrorNet size does not match with VectorPortReference size

Implements torc::generic::Connectable.

Definition at line 154 of file VectorPortReference.cpp.

154  {
155  if(!inNet) {
156  Error e(eMessageIdErrorPointerToItemDoesNotExist, __FUNCTION__, __FILE__, __LINE__);
157  e.saveContextData("Pointer to Net", inNet);
158  throw e;
159  }
160  if(inNet->getSize() != getSize()) {
161  Error e(eMessageIdErrorItemSizeMismatch, __FUNCTION__, __FILE__, __LINE__);
162  e.saveContextData("Net Size", inNet->getSize());
163  e.saveContextData("VectorPortReference Size", getSize());
164  throw e;
165  }
166  Connectable::Connection newConnection;
167  try {
168  ConnectionHandler handler(inNet);
169  handler.connectPortRefToNet(getSharedThis());
170  newConnection = Connectable::connect(inNet);
171  } catch(Error& e) {
172  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
173  throw;
174  }
175  return newConnection;
176 }
virtual Connection connect(const NetSharedPtr &inNet)=0
Definition: Connectable.cpp:60
std::list< NetSharedPtr >::iterator Connection
Definition: Connectable.hpp:52

+ Here is the call graph for this function:

void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::constructChildren ( const boost::shared_ptr< ChildFactory > &  inFactory,
const std::vector< SizeType > &  inLimits 
)
throw (Error
)
inlineinherited

Create list of children using the provided factory and limits

Parameters
[in]inFactoryChildFactory to use for construcing children
[in]inLimitsArray dimensions
Exceptions
ErrorChildren could not be created
Note
setName() must have already been called before calling this method. For preserved arrays this does not actually do anything other than storing the factory and limits inside itself for later use.

Create list of children using the provided factory and limits

Parameters
[in]inFactoryChildFactory to use for construcing children
[in]inLimitsArray dimensions
Exceptions
ErrorChildren could not be created
Note
For preserved arrays this does not actually do anything other than storing the factory and limits inside itself for later use.
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]inNameName of the net to be Disconnected
Exceptions
ErrorProvided 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]inNnameName of the net to be Disconnected
Exceptions
ErrorProvided net was not found

Definition at line 111 of file Connectable.cpp.

111  {
112  disconnect(std::find_if(mConnectedNets.begin(), mConnectedNets.end(),
113  boost::bind<bool>(std::equal_to<std::string>(),
114  boost::bind(boost::mem_fn(&Net::getName), _1), inName)));
115 }
std::list< NetSharedPtr > mConnectedNets
virtual const std::string getName() const
Definition: Nameable.hpp:89

+ Here is the call graph for this function:

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
[in]netPointer to a net
Exceptions
ErrorProvided 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]inNetPointer to a net
Exceptions
ErrorProvided net was not found

Definition at line 128 of file Connectable.cpp.

128  {
129  disconnect(std::find(mConnectedNets.begin(), mConnectedNets.end(), inNet));
130 }
std::list< NetSharedPtr > mConnectedNets
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.

132  {
133  log("Disconnecting all\n");
134  std::vector<NetSharedPtr> nets;
135  getConnectedNets(nets, true);
136  for(std::vector<NetSharedPtr>::iterator it = nets.begin(); it != nets.end(); ++it) {
137  disconnect(*it);
138  }
139 }
void log(const char *fmt,...)
Definition: Log.cpp:89
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
Definition: Connectable.cpp:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::VectorPortReference::disconnect ( const Connectable::Connection inConnection)
throw (Error
)
virtual

Disconnect a 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]inConnectionA connection as returned by the connect() method
Exceptions
ErrorProvided connection is invalid, because pointer to the Net does not exist
  • Id : eMessageIdErrorPointerToItemDoesNotExist
  • Context Data
    • Pointer to Net - boost::shared_ptr

Disconnect a 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]connectionA connection as returned by the connect() method
Exceptions
ErrorProvided connection is invalid

Implements torc::generic::Connectable.

Definition at line 188 of file VectorPortReference.cpp.

188  {
189  NetSharedPtr connNet = *inConnection;
190  if(!connNet) {
191  Error e(eMessageIdErrorPointerToItemDoesNotExist, __FUNCTION__, __FILE__, __LINE__);
192  e.saveContextData("Pointer to Net", connNet);
193  throw e;
194  }
195  try {
196  BaseType::List children;
197  getCreatedChildren(children);
198  for_each(children.begin(), children.end(),
199  boost::bind(boost::mem_fn(&Connectable::disconnect), _1));
200  ConnectionHandler handler(connNet);
201  handler.disconnectPortRefFromNet(getSharedThis());
202  Connectable::disconnect(inConnection);
203  } catch(Error& e) {
204  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
205  throw;
206  }
207  return;
208 }
boost::shared_ptr< Net > NetSharedPtr

+ Here is the call graph for this function:

virtual void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::forceAutoBlast ( void  )
throw (Error
)
virtualinherited

Force creation of VectorBit children, even if this is a preserved Vector.

virtual const Pointer torc::generic::Composite< PortReference >::get ( const std::vector< SizeType > &  inIndices) const
throw (Error
)
pure virtualinherited

Get a specific member of this composition.

Note
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters
[in]inIndicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions
ErrorIndex dimensions mismatch

Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::VectorBit< PortReference >, and torc::generic::Scalar< PortReference >.

virtual const Pointer torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::get ( const std::vector< SizeType > &  inIndices) const
throw (Error
)
virtualinherited

Get a specific member of this composition.

Note
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters
[in]inIndicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions
ErrorIndex dimensions mismatch
  • Id : eMessageIdErrorArrayIndexSizeMismatch
  • Context Data
    • Array Index Size - size_t
    • Array Dimension Size - size_t
ErrorArray index out of bounds
  • Id : eMessageIdErrorArrayIndexOutOfBounds
  • Context Data
    • Array Index - size_t
    • Array Dimension - size_t
ErrorEmpty Array
  • Id : eMessageIdErrorEmptyArray
  • Context Data
    • Array Dimension - size_t

Get a specific member of this composition.

Note
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters
[in]inIndicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions
ErrorIndex dimensions mismatch

Implements torc::generic::Composite< PortReference >.

const PortAttributesSharedPtr torc::generic::PortReference::getAttributes ( ) const
inlineinherited

Get the attributes of the port. Attributes include dcFaninLoad, dcFanoutLoad_ etc.

Returns
Pointer to PortAttributes object.

Definition at line 123 of file PortReference.hpp.

123  {
124  return mAttributes;
125 }
PortAttributesSharedPtr mAttributes
virtual void torc::generic::Composite< PortReference >::getChildren ( List outChildren) const
throw (Error
)
pure virtualinherited

Get children of this composition.

Note
This is relevant for Vector and Bundle compositions only. Other compositions return a NULL pointer
Parameters
[out]outChildrenA list of all children for this composition

Implemented in torc::generic::Vector< PortReference, VectorPortBitReference, VectorPortBitReference::Factory, true >, torc::generic::Bundle< PortReference >, torc::generic::Scalar< PortReference >, and torc::generic::VectorBit< PortReference >.

virtual void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getChildren ( List outChildren) const
throw (Error
)
virtualinherited

Get children of this composition.

Parameters
[out]outChildrenA list of all children for this composition
Exceptions
ErrorIf factory is not set and preserve is true and the vector has not been blasted, an exception is generated.

Implements torc::generic::Composite< PortReference >.

virtual CompositionType torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getCompositionType ( ) const
virtualinherited

Get composition type for this object

Returns
The CompositionType inSource eCompositionTypeVector is returned

Implements torc::generic::Composite< PortReference >.

void torc::generic::VectorPortReference::getConnectedNets ( std::vector< NetSharedPtr > &  outNets,
bool  inSkipChildConnections = false 
) const
throw (Error
)
virtual

Reimplemented from torc::generic::Connectable.

Definition at line 210 of file VectorPortReference.cpp.

211  {
213  if(!inSkipChildConnections) {
214  BaseType::List children;
215  getCreatedChildren(children); //We need only the
216  // bits that have been created
217  BaseType::List::iterator pRef = children.begin();
218  BaseType::List::iterator nEnd = children.end();
219  for(; pRef != nEnd; ++pRef) {
220  (*pRef)->getConnectedNets(outNets, true);
221  }
222  }
223  return;
224 }
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
Definition: Connectable.cpp:45

+ Here is the call graph for this function:

virtual void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getCreatedChildren ( List outChildren) const
throw (Error
)
virtualinherited

+ Here is the caller graph for this function:

const boost::shared_ptr<ChildFactory> torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getFactory ( ) const
inlineprotectedinherited

Get current factory

Returns
Return ChildFactory object
Exceptions
ErrorNull Child Factory
  • Id : eMessageIdErrorNullChildfactory
  • Context Data

    • Child factory - ChildFactory

    Get current factory

Returns
Return ChildFactory object
bool torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getIsPreserved ( ) const
inlineinherited
void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getLimits ( std::vector< SizeType > &  outLimits) const
inlineinherited

Get dimensions of the array.

Parameters
[in]outLimitsDimensions of the vector

Get dimensions of the array.

Returns
Dimensions of the vector
PortSharedPtr torc::generic::PortReference::getMaster ( ) const
inlineinherited

Get the master(referred) port.

Returns
The master port.

Definition at line 114 of file PortReference.hpp.

114  {
115  return mMaster;
116 }
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.

52  {
53  return (mMaster) ? mMaster->getName() : std::string();
54 }
std::string string

+ Here is the caller graph for this function:

const boost::shared_ptr<Instance > torc::generic::ParentedObject< Instance >::getParent ( ) const
inlineinherited

Get a pointer to the parent object

Returns
Pointer to parent

+ Here is the caller graph for this function:

virtual Pointer torc::generic::Composite< PortReference >::getParentCollection ( ) const
inlinevirtualinherited

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]outPropertiesThe map of properties

Get the map of all properties

Returns
The map of properties

Definition at line 107 of file PropertyContainer.hpp.

108  {
109  mProperties.getValueMap(outProperties);
110  return;
111 }
void getValueMap(UserMap &outMap) const
Definition: SymTab.hpp:171
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

PropertySharedPtr torc::generic::PropertyContainer::getProperty ( const std::string &  inName)
inherited

Get a property

Parameters
[in]inNameName of the property to be retreived
Returns
Pointer to the property object if present, empty pointer otherwise.

Get a property

Parameters
[in]nameName 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.

37  {
38  PropertySharedPtr property;
39  if(!inName.empty()) {
40  mProperties.get(inName, property);
41  }
42  return property;
43 }
bool get(const KeyType &inKey, ValueType &outValue) const
Definition: SymTab.hpp:121
SymTab< std::string, PropertySharedPtr > mProperties
boost::shared_ptr< Property > PropertySharedPtr

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Pointer torc::generic::SelfReferencing< PortReference >::getSharedThis ( ) const
inlineinherited

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]ptrSet to a shared pointer to this object
virtual SizeType torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::getSize ( void  ) const
virtualinherited

Get the total number of bits of the composition

Returns
Number of bits

Implements torc::generic::Composite< PortReference >.

virtual void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::onAutoBlast ( ) const
throw (Error
)
protectedvirtualinherited
void torc::generic::VectorPortReference::onChildCreate ( const VectorPortBitReferenceSharedPtr inCreatedChild) const
throw (Error
)
virtual

Definition at line 236 of file VectorPortReference.cpp.

237  {
238  PortSharedPtr masterPort = getMaster();
239  if(masterPort) {
240  PortBinder binder(masterPort);
241  //We have now a handle to a bit whose parent's master is set
242  //But it does not have a master itself. So we get the
243  //corresponding bit from master
244  try {
245  inCreatedChild->accept(binder);
246  } catch(Error& e) {
247  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
248  throw;
249  }
250  }
251 }
PortSharedPtr getMaster() const
boost::shared_ptr< Port > PortSharedPtr

+ Here is the call graph for this function:

virtual void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::onChildCreate ( const boost::shared_ptr< ChildType > &  inCreatedChild) const
throw (Error
)
protectedvirtualinherited
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.

144 {}
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.

149 {}
void torc::generic::PortReference::setAttributes ( const PortAttributesSharedPtr inSource)
inherited

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
[in]inSourcePointer to PortAttributes object.

Definition at line 49 of file PortReference.cpp.

49  {
50  mAttributes = inSource;
51 }
PortAttributesSharedPtr mAttributes
void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::setChildren ( const List inSource)
throw (Error
)
protectedinherited

Set list of children for unpreserved vector.

Parameters
[in]inSourceList of children
void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::setFactory ( const boost::shared_ptr< ChildFactory > &  inSource)
protectedinherited

Set current factory

Parameters
[in]inSourceChildFactory object
void torc::generic::Vector< PortReference , VectorPortBitReference , VectorPortBitReference::Factory , cPreserve >::setLimits ( const std::vector< SizeType > &  inSource)
protectedinherited

Set dimensions of the array.

Parameters
[in]inSourceDimensions of the vector
virtual void torc::generic::ParentedObject< Instance >::setParent ( const boost::shared_ptr< Instance > &  inSource)
virtualinherited

Set a pointer to the parent

Parameters
[in]inSourceSet a pointer to the parent

+ Here is the caller graph for this function:

void torc::generic::VectorPortReference::setParent ( const InstanceSharedPtr inParent)
virtual

Definition at line 133 of file VectorPortReference.cpp.

133  {
135  BaseType::List children;
136  getCreatedChildren(children);
137  std::for_each(children.begin(), children.end(),
138  boost::bind(boost::mem_fn(&PortReference::setParent), _1, getParent()));
139 }
const boost::shared_ptr< Instance > getParent() const
virtual void setParent(const boost::shared_ptr< _ParentType > &inSource)

+ Here is the call graph for this function:

virtual void torc::generic::Composite< PortReference >::setParentCollection ( const Pointer inParentCollection)
inlinevirtualinherited

Set a pointer to a parnt composition.

Parameters
[in]inParentCollectionpointer to the parent collection (Vector/Bundle)

Set a pointer to a parnt composition.

Parameters
[in]parentCollectionpointer 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]inSourceThe map of properties

Definition at line 66 of file PropertyContainer.cpp.

66  {
67  std::map<std::string, PropertySharedPtr>::const_iterator it = inSource.begin();
68  for(; it != inSource.end(); it++) {
69  setProperty((*it).first, (*it).second);
70  }
71 }
bool setProperty(const std::string &inName, const PropertySharedPtr &inProperty)

+ Here is the call graph for this function:

bool torc::generic::PropertyContainer::setProperty ( const std::string &  inName,
const PropertySharedPtr inProperty 
)
inherited

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPropertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Save the inSource of a property

Parameters
[in]inNameName of the property to be saved
[in]inPopertyPointer to the property object if present, empty pointer otherwise.
Returns
bool True if saved, false otherwise.

Definition at line 53 of file PropertyContainer.cpp.

54  {
55  if(!inName.empty()) {
56  return mProperties.set(inName, inProperty);
57  }
58  return false;
59 }
bool set(const KeyType &inKey, const ValueType &inValue)
Definition: SymTab.hpp:132
SymTab< std::string, PropertySharedPtr > mProperties

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::SelfReferencing< PortReference >::setWeakThis ( const WeakPointer inWeakThis)
inlineinherited

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]weakThisA weak pointer to this object
Connectable::Connected & torc::generic::Connectable::signalNetConnected ( )
inlineinherited

A signal to indicate that a new connection has been made

Definition at line 167 of file Connectable.hpp.

167  {
168  return mSigNetConnected;
169 }
Connectable::Disconnected & torc::generic::Connectable::signalNetDisconnected ( )
inlineinherited

A signal to indicate that a new connection has been made

Definition at line 174 of file Connectable.hpp.

174  {
175  return mSigNetDisconnected;
176 }
Disconnected mSigNetDisconnected

Friends And Related Function Documentation

friend class FactoryType< VectorPortReference >
friend

Definition at line 49 of file VectorPortReference.hpp.


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