WorldStateUpdaterBase.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 ArmarX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2014
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23
24#pragma once
25
27
28#include <MemoryX/interface/observers/WorldStateObserver.h>
29
30namespace memoryx
31{
32
34 {
35 public:
38 {
39 defineOptionalProperty<std::string>("WorldStateObserverName",
40 "WorldStateObserver",
41 "Name of the WorldStateObserver proxy");
42 }
43 };
44
46 public memoryx::WorldStateUpdaterInterface,
48 {
49 public:
51 virtual void onInitWorldStateUpdater() = 0;
52 virtual void onConnectWorldStateUpdater() = 0;
53 // WorldStateUpdaterInterface interface
54 public:
55 void setObserver(const WorldStateObserverInterfacePrx& worldStateObserver,
56 const Ice::Current&) override;
57 void requestUpdateOnRegisteredObserver(const Ice::Current&) override;
58 void requestUpdate(const WorldStateObserverInterfacePrx& observer,
59 const Ice::Current& c = Ice::emptyCurrent) override;
60
61 protected:
62 WorldStateObserverInterfacePrx worldStateObserver;
63
64 // ManagedIceObject interface
65 protected:
66 void onInitComponent() override;
67 void onConnectComponent() override;
68
75 };
76
77} // namespace memoryx
constexpr T c
Default component property definition container.
Definition Component.h:70
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
void onInitComponent() override
Pure virtual hook for the subclass.
virtual void onConnectWorldStateUpdater()=0
void setObserver(const WorldStateObserverInterfacePrx &worldStateObserver, const Ice::Current &) override
WorldStateObserverInterfacePrx worldStateObserver
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
virtual void onInitWorldStateUpdater()=0
void requestUpdateOnRegisteredObserver(const Ice::Current &) override
void onConnectComponent() override
Pure virtual hook for the subclass.
void requestUpdate(const WorldStateObserverInterfacePrx &observer, const Ice::Current &c=Ice::emptyCurrent) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
VirtualRobot headers.