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

This class is used to provide a set of path delays or timing constrains (forbidden events) More...

#include <Timing.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef VisitorType< TimingVisitor
 
typedef Timing Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
const Derivation getDerivation () const
 
void setDerivation (const Derivation &value)
 
void getPathDelays (std::list< PathDelaySharedPtr > &outPathDelays) const
 
void setPathDelays (const std::list< PathDelaySharedPtr > &inPathDelays)
 
void addPathDelay (const PathDelaySharedPtr &inSource)
 
void getForbiddentEvents (std::list< ForbiddenEventSharedPtr > &outForbiddentEvents) const
 
void setForbiddentEvents (const std::list< ForbiddenEventSharedPtr > &inForbiddentEvents)
 
void addForbiddenEvent (const ForbiddenEventSharedPtr &inSource)
 
 ~Timing () throw ()
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 
void addComment (const std::string &comment)
 
const std::vector< std::string > & getComments () const
 
void setComments (const std::vector< std::string > &inSource)
 
void getUserData (std::list< std::string > &outUserData) const
 
void setUserData (const std::list< std::string > &inSource)
 
void addUserData (const std::string &inSource)
 

Protected Member Functions

 Timing ()
 

Private Member Functions

 Timing (const Timing &source)
 
Timingoperator= (const Timing &source)
 

Private Attributes

Derivation mDerivation
 
std::list< PathDelaySharedPtrmPathDelays
 
std::list
< ForbiddenEventSharedPtr
mForbiddentEvents
 

Friends

class FactoryType< Timing >
 

Detailed Description

This class is used to provide a set of path delays or timing constrains (forbidden events)

Definition at line 40 of file Timing.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<Type> torc::generic::SelfReferencing< Timing >::Pointer
inherited

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

Convenience class to visit a Timing.

Definition at line 48 of file Timing.hpp.

typedef boost::weak_ptr<Type> torc::generic::SelfReferencing< Timing >::WeakPointer
inherited

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::Timing::~Timing ( )
throw (
)

Definition at line 150 of file Timing.cpp.

150 {}
torc::generic::Timing::Timing ( )
protected

Definition at line 147 of file Timing.cpp.

147  : Visitable(), SelfReferencing<Timing>(), Commentable(), UserDataContainer(),
std::list< ForbiddenEventSharedPtr > mForbiddentEvents
Definition: Timing.hpp:149
Derivation mDerivation
Definition: Timing.hpp:147
std::list< PathDelaySharedPtr > mPathDelays
Definition: Timing.hpp:148
torc::generic::Timing::Timing ( const Timing source)
private

Member Function Documentation

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

Implements torc::generic::Visitable.

Definition at line 67 of file Timing.cpp.

67  {
68  try {
69  runVisitor(*this, inoutVisitor);
70  } catch(Error& e) {
71  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
72  throw;
73  }
74 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

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::Timing::addForbiddenEvent ( const ForbiddenEventSharedPtr inSource)

Add a forbidden event of the list of forbidden events.

Parameters
[in]inSourcePointer to forbidden event to be appended to

Definition at line 138 of file Timing.cpp.

138  {
139  try {
140  mForbiddentEvents.push_back(inSource);
141  } catch(Error& e) {
142  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
143  throw;
144  }
145 }
std::list< ForbiddenEventSharedPtr > mForbiddentEvents
Definition: Timing.hpp:149

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void torc::generic::Timing::addPathDelay ( const PathDelaySharedPtr inSource)

Add a path delay to the list of path delays.

Parameters
[in]inSourcePointer to path delay to be appended to

Definition at line 124 of file Timing.cpp.

124  {
125  try {
126  mPathDelays.push_back(inSource);
127  } catch(Error& e) {
128  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
129  throw;
130  }
131 }
std::list< PathDelaySharedPtr > mPathDelays
Definition: Timing.hpp:148

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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
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
const Derivation torc::generic::Timing::getDerivation ( ) const
inline

Get derivation

Returns
Derivation value

Definition at line 158 of file Timing.hpp.

158  {
159  return mDerivation;
160 }
Derivation mDerivation
Definition: Timing.hpp:147
void torc::generic::Timing::getForbiddentEvents ( std::list< ForbiddenEventSharedPtr > &  outForbiddentEvents) const
inline

Get all the forbidden events of this timing.

Parameters
[out]outForbiddentEventsList of events to be appended to

Definition at line 176 of file Timing.hpp.

177  {
178  outForbiddentEvents.insert(outForbiddentEvents.end(), mForbiddentEvents.begin(),
179  mForbiddentEvents.end());
180 }
std::list< ForbiddenEventSharedPtr > mForbiddentEvents
Definition: Timing.hpp:149
void torc::generic::Timing::getPathDelays ( std::list< PathDelaySharedPtr > &  outPathDelays) const
inline

Get all the path delays of this timing.

Parameters
[out]outPathDelaysList of path delays of this timing to be appended to

Definition at line 167 of file Timing.hpp.

167  {
168  outPathDelays.insert(outPathDelays.end(), mPathDelays.begin(), mPathDelays.end());
169 }
std::list< PathDelaySharedPtr > mPathDelays
Definition: Timing.hpp:148
Pointer torc::generic::SelfReferencing< Timing >::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
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
Timing& torc::generic::Timing::operator= ( const Timing source)
private
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::Timing::setDerivation ( const Derivation value)

Set derivation

Parameters
[in]valueDerivation value

Definition at line 81 of file Timing.cpp.

81  {
82  mDerivation = value;
83 }
Derivation mDerivation
Definition: Timing.hpp:147
void torc::generic::Timing::setForbiddentEvents ( const std::list< ForbiddenEventSharedPtr > &  inForbiddentEvents)

Set all the forbidden events of this timing.

Parameters
[in]inForbiddentEventsList of events to be appended to

Definition at line 107 of file Timing.cpp.

107  {
108  std::list<ForbiddenEventSharedPtr>::const_iterator it = inForbiddentEvents.begin();
109  for(; it != inForbiddentEvents.end(); it++) {
110  try {
111  addForbiddenEvent(*it);
112  } catch(Error& e) {
113  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
114  throw;
115  }
116  }
117 }
void addForbiddenEvent(const ForbiddenEventSharedPtr &inSource)
Definition: Timing.cpp:138

+ Here is the call graph for this function:

void torc::generic::Timing::setPathDelays ( const std::list< PathDelaySharedPtr > &  inPathDelays)

Set all the path delays of this timing.

Parameters
[in]inPathDelaysList of path delays of this timing to be appended to

Definition at line 90 of file Timing.cpp.

90  {
91  std::list<PathDelaySharedPtr>::const_iterator it = inPathDelays.begin();
92  for(; it != inPathDelays.end(); it++) {
93  try {
94  addPathDelay(*it);
95  } catch(Error& e) {
96  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
97  throw;
98  }
99  }
100 }
void addPathDelay(const PathDelaySharedPtr &inSource)
Definition: Timing.cpp:124

+ Here is the call 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< Timing >::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

Friends And Related Function Documentation

friend class FactoryType< Timing >
friend

Definition at line 42 of file Timing.hpp.

Field Documentation

Derivation torc::generic::Timing::mDerivation
private

Definition at line 147 of file Timing.hpp.

std::list<ForbiddenEventSharedPtr> torc::generic::Timing::mForbiddentEvents
private

Definition at line 149 of file Timing.hpp.

std::list<PathDelaySharedPtr> torc::generic::Timing::mPathDelays
private

Definition at line 148 of file Timing.hpp.


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