Chaste Release::3.1
|
#include <MultiStimulus.hpp>
Public Member Functions | |
~MultiStimulus () | |
void | AddStimulus (boost::shared_ptr< AbstractStimulusFunction > pStimulus) |
virtual double | GetStimulus (double time) |
void | Clear () |
Protected Attributes | |
std::vector< boost::shared_ptr < AbstractStimulusFunction > > | mStimuli |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
This class provides a stimulus function which is the sum of an arbitrary number of stimuli.
After creation it behaves like a ZeroStimulus until any number of stimuli are added.
Definition at line 58 of file MultiStimulus.hpp.
MultiStimulus::~MultiStimulus | ( | ) |
Destructor - just calls Clear().
Definition at line 56 of file MultiStimulus.cpp.
References Clear().
void MultiStimulus::AddStimulus | ( | boost::shared_ptr< AbstractStimulusFunction > | pStimulus | ) |
Combine a stimulus with the existing ones.
pStimulus | pointer to the stimulus to be added. |
Definition at line 39 of file MultiStimulus.cpp.
References mStimuli.
Referenced by DynamicRestitutionStimulus::DynamicRestitutionStimulus(), and S1S2Stimulus::S1S2Stimulus().
void MultiStimulus::Clear | ( | ) | [virtual] |
Clear is responsible for managing the memory of delegated stimuli
Reimplemented from AbstractStimulusFunction.
Definition at line 61 of file MultiStimulus.cpp.
References mStimuli.
Referenced by ~MultiStimulus().
Get the magnitude of the multiple stimuli at time 'time'
time | time at which to return the stimulus |
Implements AbstractStimulusFunction.
Reimplemented in S1S2Stimulus.
Definition at line 44 of file MultiStimulus.cpp.
References mStimuli.
void MultiStimulus::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, private] |
Archive the simple stimulus, never used directly - boost uses this.
archive | |
version |
Reimplemented from AbstractStimulusFunction.
Reimplemented in DynamicRestitutionStimulus, and S1S2Stimulus.
Definition at line 70 of file MultiStimulus.hpp.
References mStimuli.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractStimulusFunction.
Reimplemented in DynamicRestitutionStimulus, and S1S2Stimulus.
Definition at line 62 of file MultiStimulus.hpp.
std::vector<boost::shared_ptr<AbstractStimulusFunction> > MultiStimulus::mStimuli [protected] |
Vector of stimuli.
Definition at line 78 of file MultiStimulus.hpp.
Referenced by AddStimulus(), Clear(), S1S2Stimulus::GetStimulus(), GetStimulus(), and serialize().