Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
MultiStimulus Class Reference

#include <MultiStimulus.hpp>

+ Inheritance diagram for MultiStimulus:
+ Collaboration diagram for MultiStimulus:

Public Member Functions

 ~MultiStimulus ()
 
void AddStimulus (boost::shared_ptr< AbstractStimulusFunction > pStimulus)
 
virtual double GetStimulus (double time)
 
void Clear ()
 
- Public Member Functions inherited from AbstractStimulusFunction
virtual ~AbstractStimulusFunction ()
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~MultiStimulus()

MultiStimulus::~MultiStimulus ( )

Destructor - just calls Clear().

Definition at line 56 of file MultiStimulus.cpp.

References Clear().

Member Function Documentation

◆ AddStimulus()

void MultiStimulus::AddStimulus ( boost::shared_ptr< AbstractStimulusFunction pStimulus)

Combine a stimulus with the existing ones.

Parameters
pStimuluspointer to the stimulus to be added.

Definition at line 39 of file MultiStimulus.cpp.

References mStimuli.

Referenced by S1S2Stimulus::S1S2Stimulus(), and SteadyStateRestitutionStimulus::SteadyStateRestitutionStimulus().

◆ Clear()

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().

◆ GetStimulus()

double MultiStimulus::GetStimulus ( double  time)
virtual

Get the magnitude of the multiple stimuli at time 'time'

Parameters
timetime at which to return the stimulus
Returns
Magnitude of stimulus at time 'time'.

Implements AbstractStimulusFunction.

Reimplemented in S1S2Stimulus.

Definition at line 44 of file MultiStimulus.cpp.

References mStimuli.

◆ serialize()

template<class Archive >
void MultiStimulus::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the simple stimulus, never used directly - boost uses this.

Parameters
archive
version

Definition at line 70 of file MultiStimulus.hpp.

References mStimuli.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 62 of file MultiStimulus.hpp.

Member Data Documentation

◆ mStimuli

std::vector<boost::shared_ptr<AbstractStimulusFunction> > MultiStimulus::mStimuli
protected

Vector of stimuli.

Definition at line 78 of file MultiStimulus.hpp.

Referenced by AddStimulus(), Clear(), GetStimulus(), S1S2Stimulus::GetStimulus(), and serialize().


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