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
#include <
ArmarXCore/core/system/FactoryCollectionBase.h
>
29
30
#include <ArmarXCore/interface/core/ManagedIceObjectDependencyBase.h>
31
#include <
ArmarXCore/core/ManagedIceObjectDependency.h
>
32
#include <
ArmarXCore/core/system/FactoryCollectionBase.h
>
33
#include <
ArmarXCore/core/exceptions/local/ExpressionException.h
>
34
#include <
ArmarXCore/core/util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h
>
35
36
namespace
armarx
37
{
38
/**
39
\class ProxyDependencyFactory
40
\brief
41
\ingroup DistributedProcessingSub
42
*/
43
class
ProxyDependencyFactory
:
public
Ice::ValueFactory
44
{
45
public
:
46
Ice::ObjectPtr
create
(
const
std::string& type)
override
47
{
48
assert(type == armarx::ManagedIceObjectDependencyBase::ice_staticId());
49
return
new
ProxyDependency
();
50
}
51
};
52
}
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
getFactories
()
override
65
{
66
ObjectFactoryMap
map;
67
68
map.insert(std::make_pair(ManagedIceObjectDependencyBase::ice_staticId(),
new
ProxyDependencyFactory
));
69
add<ClientSideRemoteHandleControlBlockBase, ClientSideRemoteHandleControlBlock>(map);
70
// communicator->addObjectFactory\(new ([a-zA-Z0-9]*), ([:a-zA-Z0-9]*)::ice_staticId\(\)\)
71
// map.insert(std::make_pair( \2::ice_staticId(), new \1));
72
return
map;
73
}
74
};
75
const
FactoryCollectionBaseCleanUp
CoreObjectFactoriesVar
=
FactoryCollectionBase::addToPreregistration
(
new
CoreObjectFactories
());
76
77
}
armarx::ObjectFactories::CoreObjectFactoriesVar
const FactoryCollectionBaseCleanUp CoreObjectFactoriesVar
Definition:
CoreObjectFactories.h:75
ClientSideRemoteHandleControlBlock.h
armarx::ProxyDependencyFactory
Definition:
CoreObjectFactories.h:43
FactoryCollectionBase.h
armarx::ObjectFactoryMap
std::map< std::string, Ice::ValueFactoryPtr > ObjectFactoryMap
Definition:
FactoryCollectionBase.h:61
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:41
armarx::FactoryCollectionBase
Definition:
FactoryCollectionBase.h:63
armarx::ProxyDependency
The ProxyDependency class is part of the ManagedIceObjectConnectivity.
Definition:
ManagedIceObjectDependency.h:170
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:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::ObjectFactories::CoreObjectFactories::getFactories
ObjectFactoryMap getFactories() override
Definition:
CoreObjectFactories.h:64
ArmarXCore
core
CoreObjectFactories.h
Generated on Sat Oct 12 2024 09:14:01 for armarx_documentation by
1.8.17