Parameter.cpp
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 2012 Kai Welke
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24 
26 
27 namespace armarx
28 {
30  IceUtil::Shared(source),
31  ParameterBase(source)
32  {
33  if (type != source.type)
34  {
35  throw InvalidTypeException();
36  }
37 
38  type = source.type;
39  }
40 
42  {
43  if (type != source.type)
44  {
45  throw InvalidTypeException();
46  }
47 
48  type = source.type;
49  return *this;
50  }
51 
52  ParameterBasePtr Parameter::clone(const Ice::Current& c) const
53  {
54  return new Parameter(*this);
55  }
56 
57  // setter
58  void Parameter::setVariant(const VariantBasePtr& variant, const Ice::Current& c)
59  {
60  throw InvalidTypeException();
61  }
62 
63  void Parameter::setVariantList(const SingleTypeVariantListBasePtr& variantList, const Ice::Current& c)
64  {
65  throw InvalidTypeException();
66  }
67 
68  void Parameter::setDataFieldIdentifier(const DataFieldIdentifierBasePtr& dataFieldIdentifier, const Ice::Current& c)
69  {
70  throw InvalidTypeException();
71  }
72 
73 
74  // getter
75  ParameterType Parameter::getParameterType(const Ice::Current& c) const
76  {
77  return type;
78  }
79 
80  VariantTypeId Parameter::getVariantType(const Ice::Current& c) const
81  {
82  throw InvalidTypeException("Accessing get getVariantTypeId() on the Parameter-Baseclass does not work.");
83  }
84 
85  VariantBasePtr Parameter::getVariant(const Ice::Current& c) const
86  {
87  throw InvalidTypeException("Accessing get getVariant() on the Parameter-Baseclass does not work.");
88  }
89 
90  SingleTypeVariantListBasePtr Parameter::getVariantList(const Ice::Current& c) const
91  {
92  throw InvalidTypeException("Accessing get getVariantList() on the Parameter-Baseclass does not work.");
93  }
94 
96  {
97  throw InvalidTypeException();
98  }
99 
100  bool Parameter::validate(const Ice::Current& c) const
101  {
102  return true;
103  }
104 }
armarx::Parameter::setVariant
void setVariant(const VariantBasePtr &variant, const Ice::Current &c=Ice::emptyCurrent) override
Definition: Parameter.cpp:58
armarx::Parameter::Parameter
Parameter()
Creates an empty Parameter.
Definition: Parameter.h:51
armarx::Parameter::getDataFieldIdentifier
DataFieldIdentifierBasePtr getDataFieldIdentifier(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:95
armarx::Parameter::setDataFieldIdentifier
void setDataFieldIdentifier(const DataFieldIdentifierBasePtr &dataFieldIdentifier, const Ice::Current &c=Ice::emptyCurrent) override
Definition: Parameter.cpp:68
armarx::Parameter
Definition: Parameter.h:44
armarx::Parameter::validate
bool validate(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:100
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
IceUtil
Definition: Instance.h:21
IceInternal::Handle<::armarx::VariantBase >
armarx::Parameter::getVariant
VariantBasePtr getVariant(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:85
armarx::Parameter::getParameterType
ParameterType getParameterType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:75
armarx::VariantTypeId
Ice::Int VariantTypeId
Definition: Variant.h:44
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition: point_cloud_graph.h:681
armarx::Parameter::clone
ParameterBasePtr clone(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:52
Parameter.h
armarx::Parameter::setVariantList
void setVariantList(const SingleTypeVariantListBasePtr &variantList, const Ice::Current &c=Ice::emptyCurrent) override
Definition: Parameter.cpp:63
armarx::Parameter::getVariantList
SingleTypeVariantListBasePtr getVariantList(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:90
armarx::Parameter::getVariantType
VariantTypeId getVariantType(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: Parameter.cpp:80
armarx::Parameter::operator=
virtual Parameter & operator=(const Parameter &source)
Definition: Parameter.cpp:41
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28