CoreObjectFactories.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package ArmarX::Core
19
* @author Kai Welke (welke _at_ kit _dot_ edu)
20
* @date 2011
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
25
#pragma once
26
27
#include <Ice/ValueFactory.h>
28
29
#include <
ArmarXCore/core/ManagedIceObjectDependency.h
>
30
#include <
ArmarXCore/core/exceptions/local/ExpressionException.h
>
31
#include <
ArmarXCore/core/system/FactoryCollectionBase.h
>
32
#include <
ArmarXCore/core/util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h
>
33
#include <ArmarXCore/interface/core/ManagedIceObjectDependencyBase.h>
34
35
namespace
armarx
36
{
37
/**
38
\class ProxyDependencyFactory
39
\brief
40
\ingroup DistributedProcessingSub
41
*/
42
class
ProxyDependencyFactory
:
public
Ice::ValueFactory
43
{
44
public
:
45
Ice::ObjectPtr
46
create
(
const
std::string& type)
override
47
{
48
assert(type == armarx::ManagedIceObjectDependencyBase::ice_staticId());
49
return
new
ProxyDependency
();
50
}
51
};
52
}
// namespace armarx
53
54
namespace
armarx::ObjectFactories
55
{
56
/**
57
\class CoreObjectFactories
58
\brief
59
\ingroup DistributedProcessingSub
60
*/
61
class
CoreObjectFactories
:
public
FactoryCollectionBase
62
{
63
public
:
64
ObjectFactoryMap
65
getFactories
()
override
66
{
67
ObjectFactoryMap
map;
68
69
map.insert(std::make_pair(ManagedIceObjectDependencyBase::ice_staticId(),
70
new
ProxyDependencyFactory
));
71
add<ClientSideRemoteHandleControlBlockBase, ClientSideRemoteHandleControlBlock>(map);
72
// communicator->addObjectFactory\(new ([a-zA-Z0-9]*), ([:a-zA-Z0-9]*)::ice_staticId\(\)\)
73
// map.insert(std::make_pair( \2::ice_staticId(), new \1));
74
return
map;
75
}
76
};
77
78
const
FactoryCollectionBaseCleanUp
CoreObjectFactoriesVar
=
79
FactoryCollectionBase::addToPreregistration
(
new
CoreObjectFactories
());
80
81
}
// namespace armarx::ObjectFactories
armarx::ObjectFactories::CoreObjectFactoriesVar
const FactoryCollectionBaseCleanUp CoreObjectFactoriesVar
Definition:
CoreObjectFactories.h:78
ClientSideRemoteHandleControlBlock.h
armarx::ProxyDependencyFactory
Definition:
CoreObjectFactories.h:42
FactoryCollectionBase.h
armarx::ObjectFactoryMap
std::map< std::string, Ice::ValueFactoryPtr > ObjectFactoryMap
Definition:
FactoryCollectionBase.h:62
armarx::ProxyDependencyFactory::create
Ice::ObjectPtr create(const std::string &type) override
Definition:
CoreObjectFactories.h:46
armarx::FactoryCollectionBase::addToPreregistration
static FactoryCollectionBaseCleanUp addToPreregistration(FactoryCollectionBasePtr factoryCollection)
Definition:
FactoryCollectionBase.cpp:43
armarx::FactoryCollectionBase
Definition:
FactoryCollectionBase.h:64
armarx::ProxyDependency
The ProxyDependency class is part of the ManagedIceObjectConnectivity.
Definition:
ManagedIceObjectDependency.h:177
ManagedIceObjectDependency.h
ExpressionException.h
armarx::ObjectFactories::CoreObjectFactories
Definition:
CoreObjectFactories.h:61
armarx::ObjectFactories
Definition:
CoreObjectFactories.h:54
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition:
Object.h:36
armarx::FactoryCollectionBaseCleanUp
Definition:
FactoryCollectionBase.h:39
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:27
armarx::ObjectFactories::CoreObjectFactories::getFactories
ObjectFactoryMap getFactories() override
Definition:
CoreObjectFactories.h:65
ArmarXCore
core
CoreObjectFactories.h
Generated on Sat Apr 12 2025 09:13:28 for armarx_documentation by
1.8.17