OacParameterList.cpp
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::Core
17 * @author Nils Adermann <naderman@naderman.de>
18 * @date 2013
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "OacParameterList.h"
24 
26 
27 namespace memoryx
28 {
29  std::vector<std::string> OacParameterList::getNames(const Ice::Current& c) const
30  {
31  return parameterNames;
32  }
33 
34  void OacParameterList::setNames(const std::vector<std::string>& names, const Ice::Current& c)
35  {
36  parameterNames = names;
37  }
38 
39  void OacParameterList::serialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c) const
40  {
41  armarx::AbstractObjectSerializerPtr obj = armarx::AbstractObjectSerializerPtr::dynamicCast(serializer);
42 
43  obj->setStringArray("names", parameterNames);
44  }
45 
46  void OacParameterList::deserialize(const armarx::ObjectSerializerBasePtr& serializer, const Ice::Current& c)
47  {
48  armarx::AbstractObjectSerializerPtr obj = armarx::AbstractObjectSerializerPtr::dynamicCast(serializer);
49 
50  obj->getStringArray("names", parameterNames);
51  }
52 
53  armarx::VariantDataClassPtr OacParameterList::clone(const Ice::Current& c) const
54  {
56 
57  clone->setNames(this->getNames());
58 
59  return clone;
60  }
61 
62  std::string OacParameterList::output(const Ice::Current& c) const
63  {
64  return "OacParameterList";
65  }
66 
67  int OacParameterList::getType(const Ice::Current& c) const
68  {
70  }
71 }
memoryx::OacParameterList::clone
armarx::VariantDataClassPtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: OacParameterList.cpp:53
memoryx::VariantType::OacParamterList
const armarx::VariantTypeId OacParamterList
Definition: OacParameterList.h:31
AbstractObjectSerializer.h
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::OacParameterList::deserialize
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) override
Definition: OacParameterList.cpp:46
IceInternal::Handle
Definition: forward_declarations.h:8
memoryx::OacParameterList::setNames
void setNames(const std::vector< std::string > &names, const Ice::Current &c=Ice::emptyCurrent) override
Definition: OacParameterList.cpp:34
memoryx::OacParameterList::output
std::string output(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: OacParameterList.cpp:62
OacParameterList.h
armarx::viz::data::ElementFlags::names
const simox::meta::IntEnumNames names
Definition: json_elements.cpp:14
memoryx::OacParameterList::getType
int getType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: OacParameterList.cpp:67
memoryx::OacParameterList::getNames
std::vector< std::string > getNames(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: OacParameterList.cpp:29
memoryx::OacParameterList
Definition: OacParameterList.h:39
memoryx::OacParameterList::serialize
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const Ice::Current &c=Ice::emptyCurrent) const override
Definition: OacParameterList.cpp:39