Geometrize  1.0
An application for geometrizing images into geometric primitives
scriptutil.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <string>
5 #include <vector>
6 
7 namespace chaiscript
8 {
9 class ChaiScript;
10 }
11 
12 namespace geometrize
13 {
14 
15 namespace script
16 {
17 
22 void sleep(std::size_t ms);
23 
29 std::vector<std::string> getEngineFunctionNames(const chaiscript::ChaiScript& engine);
30 
36 std::map<std::string, std::string> getScripts(const std::string& folder);
37 
42 std::map<std::string, std::string> getDefaultShapeMutatorScripts();
43 
48 std::map<std::string, std::string> getPointerAreaOfInterestShapeMutatorScripts();
49 
54 std::map<std::string, std::string> getBeforeStepCallbackScripts();
55 
60 std::map<std::string, std::string> getAfterStepCallbackScripts();
61 
66 std::map<std::string, std::string> getStopConditionScripts();
67 
72 std::map<std::string, std::string> getOnStopConditionMetScripts();
73 
78 std::map<std::string, std::string> getAddShapePreconditionScripts();
79 
84 std::map<std::string, std::string> getBeforeAddShapeCallbackScripts();
85 
90 std::map<std::string, std::string> getAfterAddShapeCallbackScripts();
91 
96 std::map<std::string, std::string> getOnPenInputCallbackScripts();
97 
102 std::map<std::string, std::string> getOnPenProximityEnterCallbackScripts();
103 
108 std::map<std::string, std::string> getOnPenProximityExitCallbackScripts();
109 
114 std::map<std::string, std::string> getOnKeyDownEventScripts();
115 
120 std::map<std::string, std::string> getOnKeyUpEventScripts();
121 
126 std::map<std::string, std::string> getOnMouseDownEventScripts();
127 
132 std::map<std::string, std::string> getOnMouseUpEventScripts();
133 
138 std::map<std::string, std::string> getOnMouseMoveEventScripts();
139 
144 std::map<std::string, std::string> getOnMouseWheelEventScripts();
145 
150 std::map<std::string, std::string> getOnTimedUpdateEventScripts();
151 
156 std::map<std::string, std::string> getTaskQueueBatchProcessingScripts();
157 
158 }
159 
160 }
geometrize::script::getEngineFunctionNames
std::vector< std::string > getEngineFunctionNames(const chaiscript::ChaiScript &engine)
getEngineFunctionNames Gets the names of the functions registered with the given engine.
Definition: scriptutil.cpp:48
geometrize::script::getOnKeyUpEventScripts
std::map< std::string, std::string > getOnKeyUpEventScripts()
getOnKeyUpEventScripts Gets a map of scripts that are useful to call after receiving a key up event t...
Definition: scriptutil.cpp:128
geometrize::script::getPointerAreaOfInterestShapeMutatorScripts
std::map< std::string, std::string > getPointerAreaOfInterestShapeMutatorScripts()
getPointerAreaOfInterestScripts Gets a map of the scripts used for shape creation and mutation based ...
Definition: scriptutil.cpp:68
geometrize::script::getAfterStepCallbackScripts
std::map< std::string, std::string > getAfterStepCallbackScripts()
getAfterStepCallbackScripts Gets a map of scripts that are useful to call after stepping an image tas...
Definition: scriptutil.cpp:78
geometrize::script::getOnMouseDownEventScripts
std::map< std::string, std::string > getOnMouseDownEventScripts()
getOnMouseDownEventScripts Gets a map of scripts that are useful to call after receiving a mouse down...
Definition: scriptutil.cpp:133
geometrize::script::sleep
void sleep(const std::size_t ms)
sleep Causes the calling thread to sleep for the given length of time.
Definition: scriptutil.cpp:43
geometrize::script::getOnKeyDownEventScripts
std::map< std::string, std::string > getOnKeyDownEventScripts()
getOnKeyDownEventScripts Gets a map of scripts that are useful to call after receiving a key down eve...
Definition: scriptutil.cpp:123
geometrize::script::getOnPenProximityExitCallbackScripts
std::map< std::string, std::string > getOnPenProximityExitCallbackScripts()
getOnPenProximityExitCallbackScripts Gets a map of scripts that are useful to call after receiving a ...
Definition: scriptutil.cpp:118
geometrize::script::getOnMouseMoveEventScripts
std::map< std::string, std::string > getOnMouseMoveEventScripts()
getOnMouseMoveEventScripts Gets a map of scripts that are useful to call after receiving a mouse move...
Definition: scriptutil.cpp:143
geometrize::script::getDefaultShapeMutatorScripts
std::map< std::string, std::string > getDefaultShapeMutatorScripts()
getDefaultScripts Gets a map of the default scripts used for shape creation and mutation in image tas...
Definition: scriptutil.cpp:63
geometrize::script::getBeforeAddShapeCallbackScripts
std::map< std::string, std::string > getBeforeAddShapeCallbackScripts()
getBeforeAddShapeCallbackScripts Gets a map of scripts that are useful to call before adding a shape ...
Definition: scriptutil.cpp:98
geometrize::util::readFileAsString
std::string readFileAsString(const std::string &filePath)
readFileAsString Reads a file, returning a string containing the contents.
Definition: util.cpp:155
geometrize::script::getOnStopConditionMetScripts
std::map< std::string, std::string > getOnStopConditionMetScripts()
getOnStopConditionMetScripts Gets a map of scripts that are useful to call after the stop condition f...
Definition: scriptutil.cpp:88
geometrize::script::getTaskQueueBatchProcessingScripts
std::map< std::string, std::string > getTaskQueueBatchProcessingScripts()
getTaskQueueBatchProcessingScripts Gets a map of scripts used for batch processing multiple images on...
Definition: scriptutil.cpp:158
geometrize::script::getOnTimedUpdateEventScripts
std::map< std::string, std::string > getOnTimedUpdateEventScripts()
getOnTimedUpdateEventScripts Gets a map of scripts that are useful to regularly periodically call i....
Definition: scriptutil.cpp:153
chaiscript
Definition: commandlineedit.h:11
scriptutil.h
geometrize::script::getScripts
std::map< std::string, std::string > getScripts(const std::string &folder)
getDefaultScripts Gets a map of the scripts in the given folder.
Definition: scriptutil.cpp:58
geometrize::script::getOnPenProximityEnterCallbackScripts
std::map< std::string, std::string > getOnPenProximityEnterCallbackScripts()
getOnPenProximityEnterCallbackScripts Gets a map of scripts that are useful to call after receiving a...
Definition: scriptutil.cpp:113
geometrize::script::getAfterAddShapeCallbackScripts
std::map< std::string, std::string > getAfterAddShapeCallbackScripts()
getAfterAddShapeCallbackScripts Gets a map of scripts that are useful to call after adding a shape to...
Definition: scriptutil.cpp:103
geometrize::script::getOnPenInputCallbackScripts
std::map< std::string, std::string > getOnPenInputCallbackScripts()
getOnPenInputCallbackScripts Gets a map of scripts that are useful to call after receiving pen input ...
Definition: scriptutil.cpp:108
geometrize
Definition: commandlineparser.cpp:73
geometrize::script::getAddShapePreconditionScripts
std::map< std::string, std::string > getAddShapePreconditionScripts()
getAddShapePreconditionScripts Gets a map of scripts that are used to decide whether to add a shape t...
Definition: scriptutil.cpp:93
geometrize::script::getStopConditionScripts
std::map< std::string, std::string > getStopConditionScripts()
getStopConditionScripts Gets a map of scripts that get to true/false, and can be used to check whethe...
Definition: scriptutil.cpp:83
geometrize::script::getOnMouseUpEventScripts
std::map< std::string, std::string > getOnMouseUpEventScripts()
getOnMouseUpEventScripts Gets a map of scripts that are useful to call after receiving a mouse up eve...
Definition: scriptutil.cpp:138
geometrize::script::getOnMouseWheelEventScripts
std::map< std::string, std::string > getOnMouseWheelEventScripts()
getOnMouseWheelEventScripts Gets a map of scripts that are useful to call after receiving a mouse whe...
Definition: scriptutil.cpp:148
geometrize::script::getBeforeStepCallbackScripts
std::map< std::string, std::string > getBeforeStepCallbackScripts()
getBeforeStepCallbackScripts Gets a map of scripts that are useful to call prior to stepping an image...
Definition: scriptutil.cpp:73
util.h