DummyWorldStateObserver.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package MemoryX::ArmarXObjects::DummyWorrldStateObserver
17  * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #ifndef _ARMARX_COMPONENT_MemoryX_DummyWorldStateObserver_H
24 #define _ARMARX_COMPONENT_MemoryX_DummyWorldStateObserver_H
25 
27 #include <MemoryX/interface/observers/WorldStateObserver.h>
28 
29 namespace armarx
30 {
31  /**
32  * @class DummyWorldStateObserverPropertyDefinitions
33  * @brief
34  */
37  {
38  public:
41  {
42  //defineRequiredProperty<std::string>("PropertyName", "Description");
43  //defineOptionalProperty<std::string>("PropertyName", "DefaultValue", "Description");
44  }
45  };
46 
47  /**
48  * @defgroup Component-DummyWorldStateObserver DummyWorldStateObserver
49  * @ingroup MemoryX-Components
50  * A description of the component DummyWorldStateObserver.
51  *
52  * @class DummyWorldStateObserver
53  * @ingroup Component-DummyWorldStateObserver
54  * @brief Brief description of class DummyWorldStateObserver.
55  *
56  * Detailed description of class DummyWorldStateObserver.
57  */
59  virtual public memoryx::WorldStateObserverInterface,
60  virtual public armarx::Component
61  {
62  public:
63  /**
64  * @see armarx::ManagedIceObject::getDefaultName()
65  */
66  virtual std::string getDefaultName() const override
67  {
68  return "DummyWorldStateObserver";
69  }
70 
71  protected:
72  /**
73  * @see armarx::ManagedIceObject::onInitComponent()
74  */
75  virtual void onInitComponent() override;
76 
77  /**
78  * @see armarx::ManagedIceObject::onConnectComponent()
79  */
80  virtual void onConnectComponent() override;
81 
82  /**
83  * @see armarx::ManagedIceObject::onDisconnectComponent()
84  */
85  virtual void onDisconnectComponent() override;
86 
87  /**
88  * @see armarx::ManagedIceObject::onExitComponent()
89  */
90  virtual void onExitComponent() override;
91 
92  /**
93  * @see PropertyUser::createPropertyDefinitions()
94  */
96 
97  public:
98  virtual memoryx::PredicateInstanceList getWorldState(const ::Ice::Current&) override;
99  virtual bool isObservable(const ::std::string& predicateName, const ::Ice::Current&) override;
100  virtual bool updatePredicateValue(const memoryx::PredicateInstance& pi, bool removePredicate, const ::Ice::Current&) override;
101  virtual void setPredicateArgumentWhitelist(const memoryx::EntityBaseList& argumentWhitelist, const Ice::Current&) override;
102  virtual void resetPredicateArgumentWhitelist(const ::Ice::Current&) override;
103  void addObservablePredicateInstances(const memoryx::PredicateInstanceList& predicates, const Ice::Current&) override;
104  void registerAsUpdater(const std::string& name, const memoryx::WorldStateUpdaterInterfacePrx& updater, const Ice::Current&) override;
105  memoryx::WorldStateUpdaterInterfaceList getRegisteredUpdaters(const Ice::Current&) override;
106  };
107 }
108 
109 #endif
armarx::DummyWorldStateObserver::resetPredicateArgumentWhitelist
virtual void resetPredicateArgumentWhitelist(const ::Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:75
armarx::DummyWorldStateObserver::onExitComponent
virtual void onExitComponent() override
Definition: DummyWorldStateObserver.cpp:40
armarx::DummyWorldStateObserver::createPropertyDefinitions
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: DummyWorldStateObserver.cpp:44
armarx::DummyWorldStateObserver::addObservablePredicateInstances
void addObservablePredicateInstances(const memoryx::PredicateInstanceList &predicates, const Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:80
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::DummyWorldStateObserver::onInitComponent
virtual void onInitComponent() override
Definition: DummyWorldStateObserver.cpp:28
armarx::DummyWorldStateObserver::setPredicateArgumentWhitelist
virtual void setPredicateArgumentWhitelist(const memoryx::EntityBaseList &argumentWhitelist, const Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:70
armarx::DummyWorldStateObserver::getRegisteredUpdaters
memoryx::WorldStateUpdaterInterfaceList getRegisteredUpdaters(const Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:90
armarx::DummyWorldStateObserver::onDisconnectComponent
virtual void onDisconnectComponent() override
Definition: DummyWorldStateObserver.cpp:36
pi
#define pi
Definition: Transition.cpp:37
armarx::DummyWorldStateObserver::getWorldState
virtual memoryx::PredicateInstanceList getWorldState(const ::Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:50
armarx::DummyWorldStateObserverPropertyDefinitions::DummyWorldStateObserverPropertyDefinitions
DummyWorldStateObserverPropertyDefinitions(std::string prefix)
Definition: DummyWorldStateObserver.h:39
armarx::DummyWorldStateObserver::getDefaultName
virtual std::string getDefaultName() const override
Definition: DummyWorldStateObserver.h:66
armarx::DummyWorldStateObserver
Brief description of class DummyWorldStateObserver.
Definition: DummyWorldStateObserver.h:58
armarx::DummyWorldStateObserver::updatePredicateValue
virtual bool updatePredicateValue(const memoryx::PredicateInstance &pi, bool removePredicate, const ::Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:64
armarx::DummyWorldStateObserver::onConnectComponent
virtual void onConnectComponent() override
Definition: DummyWorldStateObserver.cpp:32
armarx::DummyWorldStateObserverPropertyDefinitions
Definition: DummyWorldStateObserver.h:35
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle< class PropertyDefinitionContainer >
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::DummyWorldStateObserver::registerAsUpdater
void registerAsUpdater(const std::string &name, const memoryx::WorldStateUpdaterInterfacePrx &updater, const Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:85
armarx::DummyWorldStateObserver::isObservable
virtual bool isObservable(const ::std::string &predicateName, const ::Ice::Current &) override
Definition: DummyWorldStateObserver.cpp:58