Choreonoid  1.8
IoConnectionMapItem.h
Go to the documentation of this file.
1 #ifndef CNOID_BODY_PLUGIN_IO_CONNECTION_MAP_ITEM_H
2 #define CNOID_BODY_PLUGIN_IO_CONNECTION_MAP_ITEM_H
3 
4 #include <cnoid/Item>
5 #include "exportdecl.h"
6 
7 namespace cnoid {
8 
9 class IoConnectionMap;
10 class BodyItem;
11 class DigitalIoDevice;
12 
13 class CNOID_EXPORT IoConnectionMapItem : public Item
14 {
15 public:
16  static void initializeClass(ExtensionManager* ext);
17 
20  virtual ~IoConnectionMapItem();
21 
22  IoConnectionMap* connectionMap();
23  const IoConnectionMap* connectionMap() const;
24 
25  void forEachIoDevice(std::function<void(BodyItem* bodyItem, DigitalIoDevice* device)> callback) const;
26 
27  void refreshIoDeviceInstances(bool enableWarningMessages = true);
28 
29  virtual bool store(Archive& archive) override;
30  virtual bool restore(const Archive& archive) override;
31 
32 protected:
33  virtual Item* doDuplicate() const override;
34  virtual void onTreePathChanged() override;
35 
36 private:
37  class Impl;
38  Impl* impl;
39 };
40 
42 
43 }
44 
45 #endif
46 
cnoid::DigitalIoDevice
Definition: DigitalIoDevice.h:12
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::Archive
Definition: Archive.h:22
cnoid::ref_ptr< IoConnectionMapItem >
cnoid::BodyItem
Definition: BodyItem.h:28
cnoid::IoConnectionMap
Definition: IoConnectionMap.h:85
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::IoConnectionMapItemPtr
ref_ptr< IoConnectionMapItem > IoConnectionMapItemPtr
Definition: IoConnectionMapItem.h:41
cnoid::IoConnectionMapItem
Definition: IoConnectionMapItem.h:13