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
33#include <ArmarXCore/interface/core/ManagedIceObjectDependencyBase.h>
34
35namespace 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
55{
56 /**
57 \class CoreObjectFactories
58 \brief
59 \ingroup DistributedProcessingSub
60 */
62 {
63 public:
65 getFactories() override
66 {
68
69 map.insert(std::make_pair(ManagedIceObjectDependencyBase::ice_staticId(),
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
80
81} // namespace armarx::ObjectFactories
static FactoryCollectionBaseCleanUp addToPreregistration(FactoryCollectionBasePtr factoryCollection)
void add(ObjectFactoryMap &map)
Ice::ObjectPtr create(const std::string &type) override
The ProxyDependency class is part of the ManagedIceObjectConnectivity.
const FactoryCollectionBaseCleanUp CoreObjectFactoriesVar
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::map< std::string, Ice::ValueFactoryPtr > ObjectFactoryMap