Talk:FGPythonSys: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
== FGNasalSys vs FGPythonSys - common baseclass == | == FGNasalSys vs FGPythonSys - common baseclass == | ||
These are APIs that are sufficiently generic in nature to be moved to a common baseclass that can be shared by FGPythonSys/FGNasalSys: | |||
* printlog() | |||
* loadModule() | * loadModule() | ||
* loadPropertyScripts() | * loadPropertyScripts() |
Revision as of 16:17, 11 February 2016
FGNasalSys vs FGPythonSys - common baseclass
These are APIs that are sufficiently generic in nature to be moved to a common baseclass that can be shared by FGPythonSys/FGNasalSys:
- printlog()
- loadModule()
- loadPropertyScripts()
- addcommand()/removecomand()
- run fgcommand (with locking, e.g. using SGMutex)
class FGScriptingSystem : public SGSubsystem, public SGPropertyChangeListener {
public:
FGScriptingSystem();
virtual ~FGScriptingSystem();
const char* readfile(const char* file, int* lenOut);
// Subsystem functions.
virtual void init();
virtual void reinit();
virtual void bind();
virtual void unbind();
virtual void update(double dt);
protected:
// Load and execute a script.
bool loadModule(SGPath file, const char *module) = 0;
virtual void loadPropertyScripts() = 0;
virtual void loadPropertyScripts(SGPropertyNode *n) = 0;
private:
};