Choreonoid  1.8
ScriptItem.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BASE_SCRIPT_ITEM_H
7 #define CNOID_BASE_SCRIPT_ITEM_H
8 
9 #include "AbstractTextItem.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class CNOID_EXPORT ScriptItem : public AbstractTextItem
15 {
16 public:
17  static void initializeClass(ExtensionManager* ext);
18 
19  ScriptItem();
20  ScriptItem(const ScriptItem& org);
21 
22  virtual const std::string& textFilename() const;
23  virtual const std::string& scriptFilename() const = 0;
24 
25  virtual std::string identityName() const;
26 
27  virtual void setBackgroundMode(bool on) = 0;
28  virtual bool isBackgroundMode() const;
29  virtual bool isRunning() const;
30 
31  virtual bool execute() = 0;
32 
37  virtual bool executeCode(const char* code);
38 
45  virtual bool waitToFinish(double timeout = 0.0);
46 
47  virtual std::string resultString() const;
48 
49  virtual SignalProxy<void()> sigScriptFinished() = 0;
50 
51  virtual bool terminate() = 0;
52 
53 protected:
54  virtual ~ScriptItem();
55 };
56 
58 }
59 
60 #endif
cnoid::AbstractTextItem
Definition: AbstractTextItem.h:14
cnoid::ScriptItem
Definition: ScriptItem.h:14
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
AbstractTextItem.h
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::ScriptItemPtr
ref_ptr< ScriptItem > ScriptItemPtr
Definition: ScriptItem.h:57
cnoid::SignalProxy
Definition: Signal.h:470