Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Namespaces | Functions
scriptutil.cpp File Reference
#include "scriptutil.h"
#include <chrono>
#include <map>
#include <string>
#include <thread>
#include <vector>
#include <QDirIterator>
#include <QString>
#include "chaiscript/chaiscript.hpp"
#include "chaiscript/language/chaiscript_engine.hpp"
#include "common/util.h"

Namespaces

 geometrize
 < Energy function passed to the image task worker thread.
 
 geometrize::script
 

Functions

void geometrize::script::sleep (std::size_t ms)
 sleep Causes the calling thread to sleep for the given length of time. More...
 
std::vector< std::string > geometrize::script::getEngineFunctionNames (const chaiscript::ChaiScript &engine)
 getEngineFunctionNames Gets the names of the functions registered with the given engine. More...
 
std::map< std::string,
std::string > 
geometrize::script::getScripts (const std::string &folder)
 getDefaultScripts Gets a map of the scripts in the given folder. Path to the folder containing the ChaiScript scripts to retrieve. The files must have the ".chai" file extension. More...
 
std::map< std::string,
std::string > 
geometrize::script::getDefaultShapeMutatorScripts ()
 getDefaultScripts Gets a map of the default scripts used for shape creation and mutation in image tasks. More...
 
std::map< std::string,
std::string > 
geometrize::script::getPointerAreaOfInterestShapeMutatorScripts ()
 getPointerAreaOfInterestScripts Gets a map of the scripts used for shape creation and mutation based around user input/pointer interaction. More...
 
std::map< std::string,
std::string > 
geometrize::script::getBeforeStepCallbackScripts ()
 getBeforeStepCallbackScripts Gets a map of scripts that are useful to call prior to stepping an image task (i.e. before starting work to find a shape to add). More...
 
std::map< std::string,
std::string > 
geometrize::script::getAfterStepCallbackScripts ()
 getAfterStepCallbackScripts Gets a map of scripts that are useful to call after stepping an image task (i.e. after completing work to find a shape to add). More...
 
std::map< std::string,
std::string > 
geometrize::script::getStopConditionScripts ()
 getStopConditionScripts Gets a map of scripts that get to true/false, and can be used to check whether to stop an image task (usually after stepping). More...
 
std::map< std::string,
std::string > 
geometrize::script::getBeforeAddShapeCallbackScripts ()
 getBeforeAddShapeCallbackScripts Gets a map of scripts that are useful to call before adding a shape to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getAfterAddShapeCallbackScripts ()
 getAfterAddShapeCallbackScripts Gets a map of scripts that are useful to call after adding a shape to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnPenInputCallbackScripts ()
 getOnPenInputCallbackScripts Gets a map of scripts that are useful to call after receiving pen input to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnPenProximityEnterCallbackScripts ()
 getOnPenProximityEnterCallbackScripts Gets a map of scripts that are useful to call after receiving a pen proximity enter event. This is application global, not bound to a particular view. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnPenProximityExitCallbackScripts ()
 getOnPenProximityExitCallbackScripts Gets a map of scripts that are useful to call after receiving a pen proximity exit event. This is application global, not bound to a particular view. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnKeyDownEventScripts ()
 getOnKeyDownEventScripts Gets a map of scripts that are useful to call after receiving a key down event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnKeyUpEventScripts ()
 getOnKeyUpEventScripts Gets a map of scripts that are useful to call after receiving a key up event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnMouseDownEventScripts ()
 getOnMouseDownEventScripts Gets a map of scripts that are useful to call after receiving a mouse down event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnMouseUpEventScripts ()
 getOnMouseUpEventScripts Gets a map of scripts that are useful to call after receiving a mouse up event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnMouseMoveEventScripts ()
 getOnMouseMoveEventScripts Gets a map of scripts that are useful to call after receiving a mouse move event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnMouseWheelEventScripts ()
 getOnMouseWheelEventScripts Gets a map of scripts that are useful to call after receiving a mouse wheel event to the image task views. More...
 
std::map< std::string,
std::string > 
geometrize::script::getOnTimedUpdateEventScripts ()
 getOnTimedUpdateEventScripts Gets a map of scripts that are useful to regularly periodically call i.e. on update More...