ListeningPluginUser.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
5 #include <RobotAPI/interface/armem/client/MemoryListenerInterface.h>
6 
7 #include "PluginUser.h"
8 
10 {
11  class ListeningPlugin;
12 
13  /**
14  * @brief A memory name system client which listens to the memory updates
15  * topic (`MemoryListenerInterface`).
16  *
17  * Derive from this plugin user class to receive memory update events.
18  * If your class already inherits from an ice interface, your ice interface might need to inherit from the
19  * MemoryListenerInterface to avoid errors.
20  */
21  class ListeningPluginUser : virtual public PluginUser, virtual public MemoryListenerInterface
22  {
23  protected:
25  virtual ~ListeningPluginUser() override;
26 
27 
28  // MemoryListenerInterface
29  virtual void memoryUpdated(const std::vector<data::MemoryID>& updatedSnapshotIDs,
30  const Ice::Current&) override;
31 
32 
33  private:
34  ListeningPlugin* listeningPlugin = nullptr;
35  };
36 
37 } // namespace armarx::armem::client::plugins
38 
39 namespace armarx::armem::client
40 {
42 }
43 
44 namespace armarx::armem
45 {
47 }
armarx::armem::client::plugins::ListeningPluginUser::memoryUpdated
virtual void memoryUpdated(const std::vector< data::MemoryID > &updatedSnapshotIDs, const Ice::Current &) override
Definition: ListeningPluginUser.cpp:20
armarx::armem
Definition: LegacyRobotStateMemoryAdapter.cpp:32
armarx::armem::client
This file is part of ArmarX.
Definition: forward_declarations.h:6
armarx::armem::client::ListeningPluginUser
plugins::ListeningPluginUser ListeningPluginUser
Definition: ListeningPluginUser.h:41
armarx::armem::client::plugins::PluginUser
Adds the Memory Name System client component plugin.
Definition: PluginUser.h:27
armarx::armem::client::plugins::ListeningPlugin
Subscribes the memory updates topic.
Definition: ListeningPlugin.h:16
armarx::armem::client::plugins::ListeningPluginUser::ListeningPluginUser
ListeningPluginUser()
Definition: ListeningPluginUser.cpp:10
armarx::armem::client::plugins
This file is part of ArmarX.
Definition: forward_declarations.h:23
PluginUser.h
armarx::armem::client::plugins::ListeningPluginUser::~ListeningPluginUser
virtual ~ListeningPluginUser() override
Definition: ListeningPluginUser.cpp:15
armarx::armem::client::plugins::ListeningPluginUser
A memory name system client which listens to the memory updates topic (MemoryListenerInterface).
Definition: ListeningPluginUser.h:21