#include <MultiStimulus.hpp>
Public Member Functions | |
void | AddStimulus (boost::shared_ptr< AbstractStimulusFunction > pStimulus) |
double | GetStimulus (double time) |
void | Clear () |
Private Member Functions | |
template<class Archive> | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
std::vector< boost::shared_ptr < AbstractStimulusFunction > > | mStimuli |
Friends | |
class | boost::serialization::access |
After creation it behaves like a ZeroStimulus until any number of stimuli are added.
Definition at line 56 of file MultiStimulus.hpp.
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.
Definition at line 68 of file MultiStimulus.hpp.
References mStimuli.
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 32 of file MultiStimulus.cpp.
References mStimuli.
double MultiStimulus::GetStimulus | ( | double | time | ) | [virtual] |
Get the magnitude of the multiple stimuli at time 'time'
time | time at which to return the stimulus |
Implements AbstractStimulusFunction.
Definition at line 37 of file MultiStimulus.cpp.
References mStimuli.
void MultiStimulus::Clear | ( | ) | [virtual] |
Clear is responsible for managing the memory of delegated stimuli
Reimplemented from AbstractStimulusFunction.
Definition at line 49 of file MultiStimulus.cpp.
References mStimuli.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractStimulusFunction.
Definition at line 60 of file MultiStimulus.hpp.
std::vector<boost::shared_ptr<AbstractStimulusFunction> > MultiStimulus::mStimuli [private] |
Vector of stimuli.
Definition at line 76 of file MultiStimulus.hpp.
Referenced by AddStimulus(), Clear(), GetStimulus(), and serialize().