DtoVariant.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
// Base class
27
#include "
SpecializedVariant.h
"
28
29
// ArmarX
30
31
namespace
armarx::aron::type::detail
32
{
33
template
<
typename
AronTypeT,
typename
DerivedT>
34
class
DtoVariant
:
public
SpecializedVariantBase
<AronTypeT, DerivedT>
35
{
36
public
:
37
using
SpecializedVariantBase<AronTypeT, DerivedT>::SpecializedVariantBase
;
38
39
virtual
~DtoVariant
() =
default
;
40
41
/* virtual implementations */
42
VariantPtr
43
navigateAbsolute
(
const
Path
&
path
)
const override
44
{
45
throw
error::AronException
(
46
__PRETTY_FUNCTION__,
47
"Could not navigate through an dto navigator. The input path was: "
+
48
path
.
toString
(),
49
Variant::getPath
());
50
}
51
52
std::vector<VariantPtr>
53
getChildren
()
const override
54
{
55
return
{};
56
}
57
58
size_t
59
childrenSize
()
const override
60
{
61
return
0;
62
}
63
};
64
}
// namespace armarx::aron::type::detail
armarx::aron::error::AronException
A base class for aron exceptions.
Definition:
Exception.h:36
armarx::aron::type::VariantPtr
std::shared_ptr< Variant > VariantPtr
Definition:
forward_declarations.h:11
armarx::aron::type::detail
Definition:
AnyVariant.h:32
armarx::aron::type::detail::DtoVariant::navigateAbsolute
VariantPtr navigateAbsolute(const Path &path) const override
naviate absolute
Definition:
DtoVariant.h:43
SpecializedVariant.h
armarx::aron::type::detail::SpecializedVariantBase
Definition:
SpecializedVariant.h:35
armarx::aron::type::detail::DtoVariant::~DtoVariant
virtual ~DtoVariant()=default
armarx::aron::Path
The Path class.
Definition:
Path.h:35
armarx::aron::type::detail::DtoVariant
Definition:
DtoVariant.h:34
armarx::aron::type::detail::DtoVariant::getChildren
std::vector< VariantPtr > getChildren() const override
get all child elements
Definition:
DtoVariant.h:53
armarx::aron::type::Variant::path
const Path path
Definition:
Variant.h:109
armarx::aron::type::detail::DtoVariant::childrenSize
size_t childrenSize() const override
Definition:
DtoVariant.h:59
armarx::aron::Path::toString
std::string toString() const
Definition:
Path.cpp:127
armarx::aron::type::Variant::getPath
Path getPath() const
Definition:
Variant.cpp:68
RobotAPI
libraries
aron
core
type
variant
detail
DtoVariant.h
Generated on Sat Apr 5 2025 09:13:27 for armarx_documentation by
1.8.17