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

This class is used within simulate to describe input stimuli and expected responces over a certain time interval. More...

#include <WaveValue.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef VisitorType< WaveValueVisitor
 
typedef WaveValue Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
const Value getDeltaTimeDuration () const
 
void setDeltaTimeDuration (const Value &value)
 
const LogicElementSharedPtr getLogicWaveform () const
 
void setLogicWaveform (const LogicElementSharedPtr &inSource)
 
 ~WaveValue () throw ()
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) throw (Error)
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 

Protected Member Functions

 WaveValue ()
 

Private Member Functions

 WaveValue (const WaveValue &source)
 
WaveValueoperator= (const WaveValue &source)
 

Private Attributes

Value mDeltaTimeDuration
 
LogicElementSharedPtr mLogicWaveform
 

Friends

class FactoryType< WaveValue >
 

Detailed Description

This class is used within simulate to describe input stimuli and expected responces over a certain time interval.

Definition at line 35 of file WaveValue.hpp.

Member Typedef Documentation

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

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

Convenience class to visit a WaveValue.

Definition at line 43 of file WaveValue.hpp.

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

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::WaveValue::~WaveValue ( )
throw (
)

Definition at line 57 of file WaveValue.cpp.

57 {}
torc::generic::WaveValue::WaveValue ( )
protected

Definition at line 54 of file WaveValue.cpp.

54  : Nameable(), SelfReferencing<WaveValue>(), mDeltaTimeDuration(),
55  mLogicWaveform() {}
LogicElementSharedPtr mLogicWaveform
Definition: WaveValue.hpp:107
torc::generic::WaveValue::WaveValue ( const WaveValue source)
private

Member Function Documentation

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

Definition at line 59 of file WaveValue.cpp.

59  {
60  try {
61  runVisitor(*this, inoutVisitor);
62  } catch(Error& e) {
63  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
64  throw;
65  }
66 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

const Value torc::generic::WaveValue::getDeltaTimeDuration ( ) const
inline

Get the delta time duration between the values contained in the logic waveform.

Returns
Value Delta time duration between the values contained in the logic waveform.

Definition at line 115 of file WaveValue.hpp.

115  {
116  return mDeltaTimeDuration;
117 }
const LogicElementSharedPtr torc::generic::WaveValue::getLogicWaveform ( ) const
inline

Get the logic waveform.

Returns
Pointer to LogicElement.

Get the logic waveform.

Parameters
[out]outLogicElementsList of LogicElement (s) to be appended to

Definition at line 124 of file WaveValue.hpp.

124  {
125  return mLogicWaveform;
126 }
LogicElementSharedPtr mLogicWaveform
Definition: WaveValue.hpp:107
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:

Pointer torc::generic::SelfReferencing< WaveValue >::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
WaveValue& torc::generic::WaveValue::operator= ( const WaveValue source)
private
void torc::generic::WaveValue::setDeltaTimeDuration ( const Value value)

Set the delta time duration between the values contained in the logic waveform.

Parameters
[in]valueDelta time duration between the values contained in the logic waveform.

Set the delta time duration between the values contained in the logic waveform.

Parameters
[in]ValueDelta time duration between the values contained in the logic waveform.

Definition at line 72 of file WaveValue.cpp.

72  {
73  mDeltaTimeDuration = value;
74 }
void torc::generic::WaveValue::setLogicWaveform ( const LogicElementSharedPtr inSource)

Set the logic waveform.

Parameters
[in]inSourcePointer to logic element object.

Definition at line 81 of file WaveValue.cpp.

81  {
82  mLogicWaveform = inSource;
83 }
LogicElementSharedPtr mLogicWaveform
Definition: WaveValue.hpp:107
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::SelfReferencing< WaveValue >::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< WaveValue >
friend

Definition at line 36 of file WaveValue.hpp.

Field Documentation

Value torc::generic::WaveValue::mDeltaTimeDuration
private

Definition at line 106 of file WaveValue.hpp.

LogicElementSharedPtr torc::generic::WaveValue::mLogicWaveform
private

Definition at line 107 of file WaveValue.hpp.


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