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

Represents a bundle of ports. More...

#include <PortBundle.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef VisitorType< PortBundleVisitor
 
typedef std::list
< NetSharedPtr >::iterator 
Connection
 
typedef
boost::signals2::signal< void(const
NetSharedPtr &)> 
Connected
 
typedef
boost::signals2::signal< void(const
NetSharedPtr &)> 
Disconnected
 
typedef std::string Name
 
typedef Port Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 
typedef std::vector< PointerList
 
typedef size_t SizeType
 
typedef Composite< PortBaseType
 
typedef BaseType::Type Type
 
typedef BaseType::Pointer Pointer
 
typedef BaseType::List List
 
typedef BaseType::SizeType SizeType
 
typedef Type ChildType
 

Public Member Functions

virtual void setParent (const ViewSharedPtr &inParent)
 
virtual Connectable::Connection connect (const NetSharedPtr &inNet) throw (Error)
 
void disconnect (const Connectable::Connection &inConnection) throw (Error)
 
virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
virtual ~PortBundle () throw ()
 
const EPortDirection getDirection () const
 
void setDirection (const EPortDirection &inSource)
 
const PortAttributesSharedPtr getAttributes () const
 
void setAttributes (const PortAttributesSharedPtr &inSource)
 
void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
ConnectedsignalNetConnected ()
 
DisconnectedsignalNetDisconnected ()
 
virtual void getConnectedNets (std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const throw (Error)
 
void disconnect (const std::string &inName) throw (Error)
 
void disconnect (const NetSharedPtr &net) throw (Error)
 
virtual void disconnect () throw (Error)
 
bool getIsExtern () const
 
bool isExtern () const
 
void setIsExtern (bool inIsExtern)
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) 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 Name getOriginalName () const
 
virtual void setOriginalName (const Name &inSource)
 
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< ViewgetParent () const
 
virtual void setParent (const boost::shared_ptr< View > &inSource)
 
void getUserData (std::list< std::string > &outUserData) const
 
void setUserData (const std::list< std::string > &inSource)
 
void addUserData (const std::string &inSource)
 
virtual CompositionType getCompositionType () const
 
virtual SizeType getSize () const
 
virtual void addChild (const boost::shared_ptr< Type > &child) throw (Error)
 
virtual void getChildren (List &outChildren) const throw (Error)
 
void applyOnAllChildren (const _Action &action) throw (Error)
 
virtual const Pointer get (const std::vector< SizeType > &indices) const throw (Error)
 

Protected Member Functions

 PortBundle ()
 
virtual void onConnect () throw (Error)
 
virtual void onDisconnect () throw (Error)
 

Friends

class FactoryType< PortBundle >
 

Detailed Description

Represents a bundle of ports.

The PortBundle class represents an EDIF port bundle. PortBundles are ordered collection of scalar and vector ports and can be created using the (portBundle ...) syntax.

Definition at line 44 of file PortBundle.hpp.

Member Typedef Documentation

Definition at line 48 of file Bundle.hpp.

typedef Type torc::generic::Bundle< Port >::ChildType
inherited

Definition at line 53 of file Bundle.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.

Definition at line 51 of file Bundle.hpp.

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

List of Shared Pointers to objects of type Type

Definition at line 61 of file Composite.hpp.

typedef std::string torc::generic::Renamable::Name
inherited

Definition at line 40 of file generic/Renamable.hpp.

Definition at line 50 of file Bundle.hpp.

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

Shared Pointer to object of type Type

Definition at line 55 of file Composite.hpp.

Definition at line 52 of file Bundle.hpp.

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

Definition at line 62 of file Composite.hpp.

Definition at line 49 of file Bundle.hpp.

typedef Port torc::generic::Composite< Port >::Type
inherited

Definition at line 50 of file Composite.hpp.

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

Definition at line 56 of file Composite.hpp.

Constructor & Destructor Documentation

torc::generic::PortBundle::~PortBundle ( )
throw (
)
virtual

Definition at line 187 of file PortBundle.cpp.

187  {
188  torc::generic::log("Port bundle destroyed\n");
189 }
void log(const char *fmt,...)
Definition: Log.cpp:89

+ Here is the call graph for this function:

torc::generic::PortBundle::PortBundle ( )
protected

Definition at line 185 of file PortBundle.cpp.

185 : Port(), Bundle<Port>() {}

Member Function Documentation

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

Implements torc::generic::Visitable.

Definition at line 176 of file PortBundle.cpp.

176  {
177  try {
178  runVisitor(*this, inoutVisitor);
179  } catch(Error& e) {
180  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
181  throw;
182  }
183 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

virtual void torc::generic::Bundle< Port >::addChild ( const boost::shared_ptr< Type > &  child)
throw (Error
)
virtualinherited

Add a child to the bundle. Note that, the new element is added to the end of the array.

Parameters
[in]childA pointer to a child
Exceptions
ErrorThe composition is not a container or the child type is not proper
void torc::generic::Commentable::addComment ( const std::string &  comment)
inherited

Add a comment to the object

Parameters
[in]commentThe comment to add to an existing list of comments

Definition at line 36 of file Commentable.cpp.

36  {
37  mComments.push_back(comment);
38 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::UserDataContainer::addUserData ( const std::string &  inSource)
inherited

Add an user data to the list of user data

Parameters
[in]inSourceAn user data as string

Definition at line 34 of file UserDataContainer.cpp.

34  {
35  mUserData.push_back(inSource);
36 }
std::list< std::string > mUserData
void torc::generic::Bundle< Port >::applyOnAllChildren ( const _Action &  action)
throw (Error
)
inherited

+ Here is the caller graph for this function:

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:

Connectable::Connection torc::generic::PortBundle::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 exists
  • Id : eMessageIdErrorPointerToItemDoesNotExist
  • Context Data
    • Pointe to Net object - boost::shared_ptr
ErrorNet size does not match with port bundle size
  • Id : eMessageIdErrorItemSizeMismatch
  • Context Data
    • Net Size - SizeType
    • Port Size - SizeType

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.

Implements torc::generic::Connectable.

Definition at line 55 of file PortBundle.cpp.

55  {
56  if(!inNet) {
57  Error e(eMessageIdErrorPointerToItemDoesNotExist, __FUNCTION__, __FILE__, __LINE__);
58  e.saveContextData("Pointer to the Net object does not exists", inNet);
59  throw e;
60  }
61  if(inNet->getSize() != getSize()) {
62  Error e(eMessageIdErrorItemSizeMismatch, __FUNCTION__, __FILE__, __LINE__);
63  e.saveContextData("Net Size", inNet->getSize());
64  e.saveContextData("Port Size", getSize());
65  throw e;
66  }
67  Bundle<Port>::List children;
68  BundleFlattener<Port, ScalarPort, VectorPort, VectorPortBit, PortBundle> flattener;
69  accept(flattener);
70  flattener.getChildren(children);
71 
72  Bundle<Net>::List netChildren;
73  inNet->getChildren(netChildren);
74  Bundle<Port>::List::iterator childPort = children.begin();
75  Bundle<Port>::List::iterator childEnd = children.end();
76  Bundle<Net>::List::iterator net = netChildren.begin();
77  for(; childPort != childEnd; ++childPort, ++net) {
78  try {
79  (*childPort)->connect(*net);
80  } catch(Error& e) {
81  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
82  throw;
83  }
84  }
85  Connectable::Connection newConnection;
86  try {
87  ConnectionHandler handler(inNet);
88  handler.connectPortToNet(getSharedThis());
89  newConnection = Connectable::connect(inNet);
90  } catch(Error& e) {
91  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
92  throw;
93  }
94  return newConnection;
95 }
virtual Connection connect(const NetSharedPtr &inNet)=0
Definition: Connectable.cpp:60
virtual SizeType getSize() const
virtual void accept(BaseVisitor &inoutVisitor)
Definition: PortBundle.cpp:176
std::list< NetSharedPtr >::iterator Connection
Definition: Connectable.hpp:52

+ Here is the call graph for this function:

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::PortBundle::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, because pointer to the Net does not exist

Implements torc::generic::Connectable.

Definition at line 106 of file PortBundle.cpp.

106  {
107  NetSharedPtr connNet = *inConnection;
108  if(!connNet) {
109  Error e(eMessageIdErrorConnectionInvalid, __FUNCTION__, __FILE__, __LINE__);
110  e.saveContextData("Pointer to Net", connNet);
111  throw e;
112  }
113  Bundle<Port>::List children;
114  BundleFlattener<Port, ScalarPort, VectorPort, VectorPortBit, PortBundle> flattener;
115  accept(flattener);
116  flattener.getChildren(children);
117  Bundle<Net>::List netChildren;
118  connNet->getChildren(netChildren);
119  Bundle<Port>::List::iterator childPort = children.begin();
120  Bundle<Port>::List::iterator childEnd = children.end();
121  Bundle<Net>::List::iterator net = netChildren.begin();
122  //We find all bits from the connected net and remove them
123  //from the children nets. This disconnect is a little slow
124  //as lookup is performed for each net. Otherwise we
125  //would have to save the iterators (Connection objects)
126  //for each child connection
127  for(; childPort != childEnd; ++childPort, ++net) {
128  try {
129  (*childPort)->disconnect(*net);
130  } catch(Error& e) {
131  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
132  throw;
133  }
134  }
135  try {
136  ConnectionHandler handler(connNet);
137  handler.disconnectPortFromNet(getSharedThis());
138  Connectable::disconnect(inConnection);
139  } catch(Error& e) {
140  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
141  throw;
142  }
143 }
virtual void accept(BaseVisitor &inoutVisitor)
Definition: PortBundle.cpp:176
boost::shared_ptr< Net > NetSharedPtr

+ Here is the call graph for this function:

virtual const Pointer torc::generic::Bundle< Port >::get ( const std::vector< SizeType > &  indices) const
throw (Error
)
virtualinherited

Get a specific member of this composition.

Returns
An empty pointer is returned
Exceptions
ErrorIndex dimensions mismatch

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

virtual const Pointer torc::generic::Composite< Port >::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< Port, VectorPortBit, VectorPortBit::Factory, true >, torc::generic::Bundle< Port >, torc::generic::VectorBit< Port >, and torc::generic::Scalar< Port >.

const PortAttributesSharedPtr torc::generic::Port::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 generic/Port.hpp.

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

Get children of this composition.

Parameters
[out]outChildrenA list of all children for this composition
virtual void torc::generic::Composite< Port >::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< Port, VectorPortBit, VectorPortBit::Factory, true >, torc::generic::Scalar< Port >, and torc::generic::VectorBit< Port >.

const std::vector< std::string > & torc::generic::Commentable::getComments ( ) const
inlineinherited

Get the list of all comments

Returns
A list of all comments on this object

Definition at line 85 of file Commentable.hpp.

85  {
86  return mComments;
87 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
virtual CompositionType torc::generic::Bundle< Port >::getCompositionType ( ) const
virtualinherited

Get composition type for this object

Returns
The CompositionType inSource VECTOR is returned

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

virtual CompositionType torc::generic::Composite< Port >::getCompositionType ( ) const
pure virtualinherited
void torc::generic::Connectable::getConnectedNets ( std::vector< NetSharedPtr > &  outNets,
bool  inSkipChildConnections = false 
) const
throw (Error
)
virtualinherited

Get the vector of Nets that are Connected to the current object. The connected elements are appended to the given vector

Parameters
[out]outNetsA vector of Connected nets

Get the vector of Nets that are Connected to the current object. The connected elements are appended to the given vector

Returns
A vector of Connected nets

Reimplemented in torc::generic::VectorPortReference, torc::generic::VectorNet, torc::generic::VectorPort, torc::generic::VectorNetBit, torc::generic::VectorPortBit, and torc::generic::VectorPortBitReference.

Definition at line 45 of file Connectable.cpp.

46  {
47  outNets.insert(outNets.end(), mConnectedNets.begin(), mConnectedNets.end());
48 }
std::list< NetSharedPtr > mConnectedNets

+ Here is the caller graph for this function:

const EPortDirection torc::generic::Port::getDirection ( ) const
inlineinherited

Get the direction of port

Returns
Direction of port

Definition at line 114 of file generic/Port.hpp.

114  {
115  return mDirection;
116 }
EPortDirection mDirection

+ Here is the caller graph for this function:

bool torc::generic::Extern::getIsExtern ( ) const
inlineinherited

Get whether the item is an extern(placeholder) or an actual item.

Returns
True if extern, false otherwise

Definition at line 86 of file Extern.hpp.

86  {
87  return mIsExtern;
88 }
const std::string torc::generic::Nameable::getName ( void  ) const
inlinevirtualinherited

Get the object name

Returns
Name of the object

Definition at line 89 of file Nameable.hpp.

89  {
90  return mName;
91 }

+ Here is the caller graph for this function:

Renamable::Name torc::generic::Renamable::getOriginalName ( ) const
inlinevirtualinherited

Get the new name provided for the object.

Returns
Name of the object

Definition at line 78 of file generic/Renamable.hpp.

78  {
79  return mOriginalName;
80 }

+ Here is the caller graph for this function:

const boost::shared_ptr<View > torc::generic::ParentedObject< View >::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< Port >::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< Port >::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::Bundle< Port >::getSize ( void  ) const
virtualinherited

Get the total number of bits of the composition

Returns
Number of bits

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

virtual size_t torc::generic::Composite< Port >::getSize ( void  ) const
pure virtualinherited
void torc::generic::UserDataContainer::getUserData ( std::list< std::string > &  outUserData) const
inlineinherited

Get the list of all userData

Parameters
[out]outUserDataThe list of all userData

Definition at line 78 of file UserDataContainer.hpp.

78  {
79  outUserData.insert(outUserData.end(), mUserData.begin(), mUserData.end());
80  return;
81 }
std::list< std::string > mUserData
bool torc::generic::Extern::isExtern ( ) const
inlineinherited

Get whether the item is an extern(placeholder) or an actual item.

Returns
True if extern, false otherwise

Definition at line 95 of file Extern.hpp.

95  {
96  return mIsExtern;
97 }
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::Port::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 56 of file generic/Port.cpp.

56  {
57  mAttributes = inSource;
58 }
PortAttributesSharedPtr mAttributes
void torc::generic::Commentable::setComments ( const std::vector< std::string > &  inSource)
inherited

Get the list of all comments

Parameters
[in]inSourceA list of all comments to be set on this object

Definition at line 45 of file Commentable.cpp.

45  {
46  mComments.insert(mComments.end(), inSource.begin(), inSource.end());
47 }
std::vector< std::string > mComments
Definition: Commentable.hpp:77
void torc::generic::Port::setDirection ( const EPortDirection inSource)
inherited

Set the direction of port

Parameters
[in]inSourceDirection of port

Definition at line 45 of file generic/Port.cpp.

45  {
46  mDirection = inSource;
47 }
EPortDirection mDirection
void torc::generic::Extern::setIsExtern ( bool  inIsExtern)
inherited

Set whether an item is extern or not.

Parameters
[in]isExternTrue if extern, false otherwise

Definition at line 35 of file Extern.cpp.

35  {
36  mIsExtern = inIsExtern;
37 }
void torc::generic::Nameable::setName ( const std::string &  inSource)
throw (Error
)
inherited

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)
  • Id : eMessageIdErrorEmptyItemName
  • Context Data

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)

Definition at line 41 of file Nameable.cpp.

41  {
42  if(inSource.empty()) {
43  Error e(eMessageIdErrorEmptyItemName, __FUNCTION__, __FILE__, __LINE__);
44  e.saveContextData("Nameable", inSource);
45  throw e;
46  }
47  mName = inSource;
48 }

+ Here is the call graph for this function:

void torc::generic::Renamable::setOriginalName ( const Name inSource)
virtualinherited

Set the new name provided for the object.

Parameters
[in]inSourceName of the object

Definition at line 35 of file generic/Renamable.cpp.

35  {
36  mOriginalName = inSource;
37 }
virtual void torc::generic::ParentedObject< View >::setParent ( const boost::shared_ptr< View > &  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::PortBundle::setParent ( const ViewSharedPtr inParent)
virtual

Definition at line 40 of file PortBundle.cpp.

40  {
42  applyOnAllChildren(boost::bind(boost::mem_fn(&Port::setParent), _1, getParent()));
43 }
const boost::shared_ptr< View > getParent() const
void applyOnAllChildren(const _Action &action)
virtual void setParent(const boost::shared_ptr< _ParentType > &inSource)

+ Here is the call graph for this function:

virtual void torc::generic::Composite< Port >::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::UserDataContainer::setUserData ( const std::list< std::string > &  inSource)
inherited

Set the list of userData

Parameters
[in]inSourceThe list of UserData

Definition at line 26 of file UserDataContainer.cpp.

26  {
27  mUserData.insert(mUserData.end(), inSource.begin(), inSource.end());
28 }
std::list< std::string > mUserData
void torc::generic::SelfReferencing< Port >::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< PortBundle >
friend

Definition at line 48 of file PortBundle.hpp.


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