-
Notifications
You must be signed in to change notification settings - Fork 0
/
scriptscorechecker.h
42 lines (41 loc) · 1.56 KB
/
scriptscorechecker.h
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
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SCRIPTSCORECHECKER_H
#define SCRIPTSCORECHECKER_H
#include "basescorechecker.h"
#include "QMetaType"
class ScriptScoreChecker : public BaseScoreChecker
{
friend class boost::serialization::access;
//template<class Archive> void serialize(Archive &ar, const unsigned int version);
template<class Archive> void serialize(Archive &ar, const unsigned int version)
{
// save/load base class information
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseScoreChecker);
ar & BOOST_SERIALIZATION_NVP(script)
//& BOOST_SERIALIZATION_NVP(scriptOutput)
& BOOST_SERIALIZATION_NVP(desiredState)
& BOOST_SERIALIZATION_NVP(searchString);
//ar & street1 & street2;
}
protected:
std::string script; //bash script to be run - assuming that is available
std::string scriptExtension;
std::string scriptOutput; //output from the script that ran
std::string searchString; //string to search for in script output
bool desiredState; //whether or not string is desired in output
void execute();
public:
void setScript(std::string script);
std::string getScript();
void setScriptExtension(std::string scriptExtension);
std::string getScriptExtension();
void setSearchString(std::string searchString);
std::string getSearchString();
void setDesiredState(bool state);
bool getDesiredState();
std::string getOutput();
void checkState();
ScriptScoreChecker();
};
bool gen_scriptrun_directory();
Q_DECLARE_METATYPE(ScriptScoreChecker*)
#endif // SCRIPTSCORECHECKER_H