-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScriptCommandProcessor.h
56 lines (45 loc) · 1.66 KB
/
ScriptCommandProcessor.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* ScriptCommandProcessor.h
*
* Created on: Apr 16, 2014
* Author: edwinrietmeijer
*/
#ifndef SCRIPTCOMMANDPROCESSOR_H_
#define SCRIPTCOMMANDPROCESSOR_H_
#include <vector>
#include "ScriptCommand.h"
//#include "FileInterpreter.h"
namespace scprocessor {
class ScriptCommandProcessor {
private:
std::vector<std::vector<scriptcommand::ScriptCommand *> > * aScriptStack_;
std::vector<int> scrStackLoopSize_;
std::vector<int> scrStackLoopPos_;
std::vector<double> waitDur_;
std::vector<scriptcommand::ScriptCommand *> playStacks_;
bool isDump_;
std::string scriptFileName_;
scriptcommand::ScriptCommand * dummyPlayScriptCommand_;
public:
ScriptCommandProcessor();
ScriptCommandProcessor( std::vector<std::vector<scriptcommand::ScriptCommand *> > & );
// Set all internal indexes to 0
void resetStack();
// Manually set a new stack ( resetStack() gets called automatically after )
void setStack( std::vector<std::vector<scriptcommand::ScriptCommand *> > & );
// // Dump all script commands
void dumpStack();
// Run all script command up to the next play command, then stop, saving position in scriptstack loop
void prerunStack();
// If there is a currently playing 'play' script command in any of the script stack loops, play it.
void playStack( double & );
// Choose to dump the script command to console
void setDump( bool );
void setScriptFileName( std::string );
ScriptCommandVars setDummyPlaySCPointer();
virtual ~ScriptCommandProcessor();
};
void initStack( std::vector<scriptcommand::ScriptCommand *> &, bool );
void initStack( std::vector<scriptcommand::ScriptCommand *> & );
} /* namespace scprocessor */
#endif /* SCRIPTCOMMANDPROCESSOR_H_ */