Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sbashford committed Jul 9, 2019
1 parent 1dc008c commit f7e465e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/recognition-test/RecognitionTestModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ namespace av_speech_in_noise {

void FixedLevelMethod::loadTargets(const std::string &p) {
targetList->loadFromDirectory(p);
updateCompletion();
}

void FixedLevelMethod::updateCompletion() {
complete_ = targetList->empty();
}

Expand Down Expand Up @@ -212,7 +216,7 @@ namespace av_speech_in_noise {
void FixedLevelMethod::submitResponse(
const coordinate_response_measure::SubjectResponse &
) {
complete_ = targetList->empty();
updateCompletion();
}

void FixedLevelMethod::submitResponse(const FreeResponse &) {
Expand All @@ -227,8 +231,13 @@ namespace av_speech_in_noise {
int snr_dB() override { return {}; }
void submitCorrectResponse() override {}
void submitIncorrectResponse() override {}
void writeTrial(OutputFile *, const coordinate_response_measure::SubjectResponse &) override {}
void submitResponse(const coordinate_response_measure::SubjectResponse &) override {}
void writeTrial(
OutputFile *,
const coordinate_response_measure::SubjectResponse &
) override {}
void submitResponse(
const coordinate_response_measure::SubjectResponse &
) override {}
void submitResponse(const FreeResponse &) override {}
};

Expand Down
2 changes: 2 additions & 0 deletions src/recognition-test/RecognitionTestModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ namespace av_speech_in_noise {
const coordinate_response_measure::SubjectResponse &
) override;
void submitResponse(const FreeResponse &) override;
private:
void updateCompletion();
};

class RecognitionTestModel :
Expand Down

0 comments on commit f7e465e

Please sign in to comment.