Choreonoid  1.8
PythonSimScriptItem.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_PYTHON_SIM_SCRIPT_PLUGIN_PYTHON_SIM_SCRIPT_ITEM_H
7 #define CNOID_PYTHON_SIM_SCRIPT_PLUGIN_PYTHON_SIM_SCRIPT_ITEM_H
8 
9 #include <cnoid/SimulationScriptItem>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class PythonScriptItemImpl;
15 
16 class CNOID_EXPORT PythonSimScriptItem : public SimulationScriptItem
17 {
18 public:
19  static void initialize(ExtensionManager* ext);
20 
23  virtual ~PythonSimScriptItem();
24 
25  bool setScriptFilename(const std::string& filename);
26  virtual const std::string& scriptFilename() const override;
27 
28  virtual void setBackgroundMode(bool on) override;
29  virtual bool isBackgroundMode() const override;
30  virtual bool isRunning() const override;
31 
32  virtual bool executeAsSimulationScript() override;
33  virtual bool executeCode(const char* code) override;
34  virtual bool waitToFinish(double timeout = 0.0) override;
35  virtual std::string resultString() const override;
36  virtual SignalProxy<void()> sigScriptFinished() override;
37 
38  virtual bool terminate() override;
39 
40 protected:
41  virtual void onDisconnectedFromRoot() override;
42  virtual Item* doDuplicate() const override;
43  virtual void doPutProperties(PutPropertyFunction& putProperty) override;
44  virtual bool store(Archive& archive) override;
45  virtual bool restore(const Archive& archive) override;
46 
47 private:
49 };
50 
52 
53 }
54 
55 #endif
cnoid::PythonSimScriptItemPtr
ref_ptr< PythonSimScriptItem > PythonSimScriptItemPtr
Definition: PythonSimScriptItem.h:51
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::PutPropertyFunction
Definition: PutPropertyFunction.h:51
cnoid::Archive
Definition: Archive.h:22
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::PythonSimScriptItem
Definition: PythonSimScriptItem.h:16
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::PythonScriptItemImpl
Definition: PythonScriptItemImpl.h:16
cnoid::SignalProxy
Definition: Signal.h:470
cnoid::SimulationScriptItem
Definition: SimulationScriptItem.h:16