-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplatescorechecker.cpp
More file actions
30 lines (28 loc) · 863 Bytes
/
Copy pathtemplatescorechecker.cpp
File metadata and controls
30 lines (28 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "templatescorechecker.h"
TemplateScoreChecker::TemplateScoreChecker()
{
this->vecScoreCheckers= new std::vector<BaseScoreChecker *>;
this->vecBakedScoreCheckers= new std::vector<BaseScoreChecker *>;
this->description="Template checker";
this->points=1;
this->desiredState=true;
this->checkerType="Template";
}
void TemplateScoreChecker::checkState() //loop through checkers
{
bool state=true;
for (unsigned int i=0;i< this->vecBakedScoreCheckers->size(); i++)
{
this->vecBakedScoreCheckers->at(i)->checkState();
state = (state == this->vecBakedScoreCheckers->at(i)->getState());
}
this->state=(state==getDesiredState());
}
void TemplateScoreChecker::setDesiredState(bool state)
{
this->desiredState=state;
}
bool TemplateScoreChecker::getDesiredState()
{
return this->desiredState;
}