Dict.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T),
5 * Karlsruhe Institute of Technology (KIT), all rights reserved.
6 *
7 * ArmarX is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * ArmarX is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * @author Fabian Peller-Konrad (fabian dot peller-konrad at kit dot edu)
20 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21 * GNU General Public License
22 */
23
24#pragma once
25
26// STD/STL
27#include <string>
28
29// Base Class
31
32namespace armarx::aron::type
33{
34 /**
35 * @brief The Dict class. It represents the dict type
36 * A dict only has an accepted type (a variant)
37 * for the corresponding data object @see data/variant/container/Dict.h
38 */
39 class Dict : public detail::ContainerVariant<type::dto::Dict, Dict>
40 {
41 public:
42 // constructors
43 Dict(const Path& path = Path());
44 Dict(const type::dto::Dict&, const Path& path = Path());
45
46 // public member functions
48 void setAcceptedType(const VariantPtr&);
49
50 type::dto::DictPtr toDictDTO() const;
51
52 // virtual implementations
53 VariantPtr navigateAbsolute(const Path& path) const override;
54
55 std::string getShortName() const override;
56 std::string getFullName() const override;
57 std::vector<VariantPtr> getChildren() const override;
58 size_t childrenSize() const override;
59
60 static std::string GetFullNamePrefix();
61 static std::string GetNamePrefix();
62
63 private:
64 // members
65 VariantPtr acceptedType;
66 };
67} // namespace armarx::aron::type
The Path class.
Definition Path.h:36
size_t childrenSize() const override
Definition Dict.cpp:70
static std::string GetFullNamePrefix()
Definition Dict.cpp:88
std::string getShortName() const override
get a short name of this specific type
Definition Dict.cpp:76
void setAcceptedType(const VariantPtr &)
Definition Dict.cpp:49
VariantPtr getAcceptedType() const
Definition Dict.cpp:42
type::dto::DictPtr toDictDTO() const
Definition Dict.cpp:57
std::string getFullName() const override
get the full name of this specific type
Definition Dict.cpp:82
Dict(const Path &path=Path())
Definition Dict.cpp:30
VariantPtr navigateAbsolute(const Path &path) const override
naviate absolute
Definition Dict.cpp:100
std::vector< VariantPtr > getChildren() const override
get all child elements
Definition Dict.cpp:64
static std::string GetNamePrefix()
Definition Dict.cpp:94
A convenience header to include all aron files (full include, not forward declared)
std::shared_ptr< Variant > VariantPtr