Ariles
Loading...
Searching...
No Matches
extra_visitors
rosparam
src
common.h
Go to the documentation of this file.
1
/**
2
@file
3
@author Alexander Sherikov
4
5
@copyright 2018-2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
6
(see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7
8
@brief
9
*/
10
11
#pragma once
12
13
14
#include <
ariles2/visitors/rosparam.h
>
15
16
17
// http://docs.ros.org/api/xmlrpcpp/html/classXmlRpc_1_1XmlRpcValue.html
18
#include <XmlRpcValue.h>
19
20
21
namespace
ariles2
22
{
23
namespace
ns_rosparam
24
{
25
using
NodeWrapper
=
serialization::Node<XmlRpc::XmlRpcValue *>
;
26
27
28
class
ARILES2_LOCAL
ImplBase
:
public
serialization::NodeStackBase
<NodeWrapper>
29
{
30
public
:
31
std::string
root_name_
;
32
XmlRpc::XmlRpcValue
root_value_
;
33
34
::ros::NodeHandle
nh_
;
35
36
37
public
:
38
/**
39
* @brief Get current node
40
*
41
* @return pointer to the current node
42
*/
43
XmlRpc::XmlRpcValue &
getRawNode
(
const
std::size_t depth)
44
{
45
if
(node_stack_[depth].isArray())
46
{
47
return
(getRawNode(depth - 1)[node_stack_[depth].index_]);
48
}
49
return
(*node_stack_[depth].node_);
50
}
51
52
53
XmlRpc::XmlRpcValue &
getRawNode
()
54
{
55
return
(getRawNode(node_stack_.size() - 1));
56
}
57
};
58
}
// namespace ns_rosparam
59
}
// namespace ariles2
ariles2::ns_rosparam::ImplBase
Definition
common.h:29
ariles2::ns_rosparam::ImplBase::getRawNode
XmlRpc::XmlRpcValue & getRawNode(const std::size_t depth)
Get current node.
Definition
common.h:43
ariles2::ns_rosparam::ImplBase::nh_
::ros::NodeHandle nh_
Definition
common.h:34
ariles2::ns_rosparam::ImplBase::root_name_
std::string root_name_
Definition
common.h:31
ariles2::ns_rosparam::ImplBase::root_value_
XmlRpc::XmlRpcValue root_value_
Definition
common.h:32
ariles2::ns_rosparam::ImplBase::getRawNode
XmlRpc::XmlRpcValue & getRawNode()
Definition
common.h:53
ariles2::serialization::NodeStackBase
Definition
serialization.h:126
ariles2::serialization::Node
Definition
serialization.h:54
ariles2
Definition
basic.h:17
rosparam.h
ARILES2_LOCAL
#define ARILES2_LOCAL
Definition
visibility.h:47
Generated by
1.9.8