Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Removed unused movie_stats and error_reporting parameters from MovieS…
Browse files Browse the repository at this point in the history
…timulus
  • Loading branch information
cstawarz committed Jun 22, 2010
1 parent 6df85c5 commit 4cc098e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion MoviePlugin/MWLibrary.xml
Expand Up @@ -11,7 +11,7 @@

<!-- Payload -->
<code>
<stimulus type="movie" tag="" stimulus_group="" frames_per_second="10" movie_stats="" error_reporting=""/>
<stimulus type="movie" tag="" stimulus_group="" frames_per_second="10"/>
</code>
</MWElement>
</MWElements>
20 changes: 2 additions & 18 deletions MoviePlugin/MovieStimulus.cpp
Expand Up @@ -17,14 +17,10 @@ MovieStimulus::MovieStimulus(const std::string &_tag,
const shared_ptr<Scheduler> &_scheduler,
const shared_ptr<StimulusDisplay> &_display,
const shared_ptr<Variable> &_frames_per_second,
const shared_ptr<Variable> &_statistics_reporting,
const shared_ptr<Variable> &_error_reporting,
const shared_ptr<StimulusGroup> &_stimulus_group) :
DynamicStimulusDriver(_scheduler,
_display,
_frames_per_second,
_statistics_reporting,
_error_reporting),
_frames_per_second),
Stimulus(_tag)
{
stimulus_group = _stimulus_group;
Expand Down Expand Up @@ -57,15 +53,11 @@ shared_ptr<mw::Component> MovieStimulusFactory::createObject(std::map<std::strin
const char *TAG = "tag";
const char *STIMULUS_GROUP = "stimulus_group";
const char *FRAMES_PER_SECOND = "frames_per_second";
const char *MOVIE_STATS = "movie_stats";
const char *ERROR_REPORTING = "error_reporting";

REQUIRE_ATTRIBUTES(parameters,
TAG,
STIMULUS_GROUP,
FRAMES_PER_SECOND,
MOVIE_STATS,
ERROR_REPORTING);
FRAMES_PER_SECOND);

std::string tagname(parameters.find(TAG)->second);

Expand All @@ -77,12 +69,6 @@ shared_ptr<mw::Component> MovieStimulusFactory::createObject(std::map<std::strin
shared_ptr<Variable> frames_per_second = reg->getVariable(parameters.find(FRAMES_PER_SECOND)->second);
checkAttribute(frames_per_second, parameters.find("reference_id")->second, FRAMES_PER_SECOND, parameters[FRAMES_PER_SECOND]);

shared_ptr<Variable> movie_stats = reg->getVariable(parameters.find(MOVIE_STATS)->second);
checkAttribute(movie_stats, parameters.find("reference_id")->second, MOVIE_STATS, parameters.find(MOVIE_STATS)->second);

shared_ptr<Variable> error_reporting = reg->getVariable(parameters.find(ERROR_REPORTING)->second);
checkAttribute(error_reporting, parameters.find("reference_id")->second, ERROR_REPORTING, parameters.find(ERROR_REPORTING)->second);

boost::shared_ptr <Scheduler> scheduler = Scheduler::instance();
if(scheduler == 0) {
throw SimpleException("Attempt to create movie stimulus without a valid scheduler");
Expand All @@ -97,8 +83,6 @@ shared_ptr<mw::Component> MovieStimulusFactory::createObject(std::map<std::strin
scheduler,
display,
frames_per_second,
movie_stats,
error_reporting,
the_group));

shared_ptr <StimulusNode> thisStimNode = shared_ptr<StimulusNode>(new StimulusNode(new_movie));
Expand Down
2 changes: 0 additions & 2 deletions MoviePlugin/MovieStimulus.h
Expand Up @@ -28,8 +28,6 @@ class MovieStimulus : public DynamicStimulusDriver, public Stimulus {
const boost::shared_ptr<Scheduler> &_scheduler,
const boost::shared_ptr<StimulusDisplay> &_display,
const boost::shared_ptr<Variable> &_frames_per_second,
const boost::shared_ptr<Variable> &_statistics_reporting,
const boost::shared_ptr<Variable> &_error_reporting,
const boost::shared_ptr<StimulusGroup> &_stimulus_group);

virtual void draw(shared_ptr<StimulusDisplay> display);
Expand Down

0 comments on commit 4cc098e

Please sign in to comment.