Ariles
Loading...
Searching...
No Matches
reader.h
Go to the documentation of this file.
1/**
2 @file
3 @author Alexander Sherikov
4
5 @copyright 2018 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
14namespace ariles2
15{
16 namespace ns_ros2param
17 {
18 namespace impl
19 {
20 class Reader;
21 }
22
23
24
25 /**
26 * @brief Configuration reader class
27 */
28 class Reader : public serialization::PIMPLVisitor<read::Visitor, impl::Reader>
29 {
30 protected:
32
33 public:
34 /**
35 * @brief Constructor
36 *
37 * @param[in] nh NodeHandle
38 */
39 explicit Reader(const rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &nh);
40
41
42 bool startRoot(const std::string &name);
43
44 bool startMapEntry(const std::string &child_name);
45 void endMapEntry();
46
47
49 const SizeLimitEnforcementType /*limit_type*/ = SIZE_LIMIT_NONE,
50 const std::size_t /*min*/ = 0,
51 const std::size_t /*max*/ = 0);
52 bool startIteratedMapElement(std::string &entry_name);
54 void endIteratedMap();
55
56
57 std::size_t startArray();
58 void startArrayElement();
59 void endArrayElement();
60 void endArray();
61
62
63#define ARILES2_BASIC_TYPE(type) void readElement(type &element);
64
66
67#undef ARILES2_BASIC_TYPE
68 };
69 } // namespace ns_ros2param
70} // namespace ariles2
Configuration reader class.
Definition reader.h:29
bool startIteratedMap(const SizeLimitEnforcementType=SIZE_LIMIT_NONE, const std::size_t=0, const std::size_t=0)
Definition reader.cpp:315
void endMapEntry()
endMapEntry from the current entry to its parent.
Definition reader.cpp:307
bool startIteratedMapElement(std::string &entry_name)
Definition reader.cpp:330
bool startMapEntry(const std::string &child_name)
startMapEntry to the entry with the given name
Definition reader.cpp:290
bool startRoot(const std::string &name)
Definition reader.cpp:280
#define ARILES2_BASIC_TYPES_LIST
Definition helpers.h:72
#define CPPUT_MACRO_SUBSTITUTE(macro)
Definition misc.h:21