VariantParameter.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 2012 Kai Welke
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24 
25 #pragma once
26 
28 #include <ArmarXCore/interface/observers/ParameterBase.h>
31 
32 
33 namespace armarx
34 {
35  class VariantParameter;
36  /**
37  * Typedef of VariantParameterPtr as IceInternal::Handle<VariantParameter> for convenience.
38  */
40 
41  /**
42  */
44  virtual public Parameter,
45  virtual public VariantParameterBase
46  {
47  public:
48  /**
49  * Creates an empty Parameter. Required for Ice ObjectFactory
50  */
52  {
53  type = eVariantParam;
54  variant = new Variant();
55  }
56  //! Constructs a VariantParamter and uses the pointer as the value
57  VariantParameter(const Variant& variant);
58 
60  Parameter& operator=(const Parameter& source) override;
61 
62  ParameterBasePtr clone(const Ice::Current& c = Ice::emptyCurrent) const override;
63 
64  // setter
65  void setVariant(const VariantBasePtr& variant, const Ice::Current& c = Ice::emptyCurrent) override;
66 
67  // getter
68  VariantTypeId getVariantType(const Ice::Current& c = Ice::emptyCurrent) const override;
69  VariantBasePtr getVariant(const Ice::Current& c = Ice::emptyCurrent) const override;
70 
71 
72  bool validate(const Ice::Current& c) const override;
73  };
74 }
75 
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:224
armarx::Parameter
Definition: Parameter.h:44
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::VariantParameter
Definition: VariantParameter.h:43
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
Parameter.h
armarx::navigation::client::validate
void validate(const std::vector< WaypointTarget > &path)
Definition: ice_conversions.h:70
ImportExport.h
ARMARXCORE_IMPORT_EXPORT
#define ARMARXCORE_IMPORT_EXPORT
Definition: ImportExport.h:38
armarx::VariantParameter::VariantParameter
VariantParameter()
Creates an empty Parameter.
Definition: VariantParameter.h:51
Variant.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28