Choreonoid  1.8
SimpleControllerItem.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BODY_PLUGIN_SIMPLE_CONTROLLER_ITEM_H
6 #define CNOID_BODY_PLUGIN_SIMPLE_CONTROLLER_ITEM_H
7 
8 #include <cnoid/ControllerItem>
9 #include "exportdecl.h"
10 
11 namespace cnoid {
12 
13 class SimpleController;
14 
15 class CNOID_EXPORT SimpleControllerItem : public ControllerItem
16 {
17 public:
18  static void initializeClass(ExtensionManager* ext);
19 
22  virtual ~SimpleControllerItem();
23 
24  void setController(const std::string& name);
25  SimpleController* controller();
26 
27  virtual bool initialize(ControllerIO* io) override;
28  virtual bool start() override;
29  virtual double timeStep() const override;
30  virtual void input() override;
31  virtual bool control() override;
32  virtual void output() override;
33  virtual void stop() override;
34 
35  class Impl;
36 
37 protected:
38  virtual Item* doDuplicate() const override;
39  virtual void onTreePathChanged() override;
40  virtual void onDisconnectedFromRoot() override;
41  virtual void doPutProperties(PutPropertyFunction& putProperty) override;
42  virtual bool store(Archive& archive) override;
43  virtual bool restore(const Archive& archive) override;
44 
45 private:
46  Impl* impl;
47 };
48 
50 
51 }
52 
53 #endif
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::SimpleController
Definition: SimpleController.h:82
cnoid::PutPropertyFunction
Definition: PutPropertyFunction.h:51
cnoid::Archive
Definition: Archive.h:22
cnoid::ControllerIO
Definition: ControllerIO.h:16
cnoid::ControllerItem
Definition: ControllerItem.h:20
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::SimpleControllerItemPtr
ref_ptr< SimpleControllerItem > SimpleControllerItemPtr
Definition: SimpleControllerItem.h:49
cnoid::SimpleControllerItem
Definition: SimpleControllerItem.h:15