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

This class associates a delay with a specified chain of events. Delay contains the time from first event to final event. More...

#include <PathDelay.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef PathDelay Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

const Value::MiNoMax getDelay () const
 
void setDelay (const Value::MiNoMax &inSource)
 
void getEvents (std::list< EventSharedPtr > &outEvents) const
 
void setEvents (const std::list< EventSharedPtr > &inEvents)
 
void addEvent (const EventSharedPtr &inEvent) throw (Error)
 
 PathDelay ()
 
 ~PathDelay () throw ()
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 

Private Member Functions

 PathDelay (const PathDelay &inSource)
 
PathDelayoperator= (const PathDelay &inSource)
 

Private Attributes

Value::MiNoMax mDelay
 
std::list< EventSharedPtrmEvents
 

Friends

class FactoryType< PathDelay >
 

Detailed Description

This class associates a delay with a specified chain of events. Delay contains the time from first event to final event.

Definition at line 36 of file PathDelay.hpp.

Member Typedef Documentation

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

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

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

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::PathDelay::PathDelay ( )

Definition at line 77 of file PathDelay.cpp.

77 : SelfReferencing<PathDelay>(), mDelay(), mEvents() {}
std::list< EventSharedPtr > mEvents
Definition: PathDelay.hpp:106
Value::MiNoMax mDelay
Definition: PathDelay.hpp:105
torc::generic::PathDelay::~PathDelay ( )
throw (
)

Definition at line 79 of file PathDelay.cpp.

79 {}
torc::generic::PathDelay::PathDelay ( const PathDelay inSource)
private

Member Function Documentation

void torc::generic::PathDelay::addEvent ( const EventSharedPtr inEvent)
throw (Error
)

Add an event to the list of events. Empty pointer is ignored.

Parameters
[in]inEventPointer to event to be added.

Definition at line 70 of file PathDelay.cpp.

70  {
71  if(!inEvent) {
72  return;
73  }
74  mEvents.push_back(inEvent);
75 }
std::list< EventSharedPtr > mEvents
Definition: PathDelay.hpp:106

+ Here is the caller graph for this function:

const Value::MiNoMax torc::generic::PathDelay::getDelay ( ) const
inline

Get delay

Returns
MiNoMax value

Definition at line 110 of file PathDelay.hpp.

110  {
111  return mDelay;
112 }
Value::MiNoMax mDelay
Definition: PathDelay.hpp:105
void torc::generic::PathDelay::getEvents ( std::list< EventSharedPtr > &  outEvents) const
inline

Get the list of events associated with this path delay.

Returns
outEvents List of events associated with this path delay

Definition at line 114 of file PathDelay.hpp.

114  {
115  outEvents.insert(outEvents.end(), mEvents.begin(), mEvents.end());
116 }
std::list< EventSharedPtr > mEvents
Definition: PathDelay.hpp:106
Pointer torc::generic::SelfReferencing< PathDelay >::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
PathDelay& torc::generic::PathDelay::operator= ( const PathDelay inSource)
private
void torc::generic::PathDelay::setDelay ( const Value::MiNoMax inSource)

Set delay

Parameters
[in]inSourceDelay value.

Definition at line 50 of file PathDelay.cpp.

50  {
51  mDelay = inSource;
52 }
Value::MiNoMax mDelay
Definition: PathDelay.hpp:105
void torc::generic::PathDelay::setEvents ( const std::list< EventSharedPtr > &  inEvents)

Set all the events of this forbiddenEvent.

Parameters
[in]inEventsList of events to be appended to

Set all the events of this forbiddenEvent.

Parameters
[out]inEventsList of events to be appended to

Definition at line 59 of file PathDelay.cpp.

59  {
60  std::list<EventSharedPtr>::const_iterator it = inEvents.begin();
61  for(; it != inEvents.end(); it++) {
62  try {
63  addEvent(*it);
64  } catch(Error& e) {
65  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
66  }
67  }
68 }
void addEvent(const EventSharedPtr &inEvent)
Definition: PathDelay.cpp:70

+ Here is the call graph for this function:

void torc::generic::SelfReferencing< PathDelay >::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< PathDelay >
friend

Definition at line 37 of file PathDelay.hpp.

Field Documentation

Value::MiNoMax torc::generic::PathDelay::mDelay
private

Definition at line 105 of file PathDelay.hpp.

std::list<EventSharedPtr> torc::generic::PathDelay::mEvents
private

Definition at line 106 of file PathDelay.hpp.


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