Ariles
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 
14 namespace ariles
15 {
16  namespace ns_ros
17  {
18  namespace impl
19  {
21  }
22 
23 
24 
25  /**
26  * @brief Configuration reader class
27  */
28  class ARILES_VISIBILITY_ATTRIBUTE Reader : public ns_ros::Base<ariles::read::Visitor, impl::Reader>
29  {
30  protected:
31  std::size_t getMapSize(const bool expect_empty);
32 
33 
34  public:
35  /**
36  * @brief Constructor
37  *
38  * @param[in] nh NodeHandle
39  */
40  explicit Reader(const ::ros::NodeHandle &nh);
41 
42 
43  bool descend(const std::string &child_name);
44  void ascend();
45 
46 
47  bool getMapEntryNames(std::vector<std::string> &child_names);
48 
49 
50  std::size_t startArray();
51  void shiftArray();
52  void endArray();
53 
54  bool startRoot(const std::string &name);
55  void endRoot(const std::string &name);
56 
57 
58 #define ARILES_BASIC_TYPE(type) void readElement(type &element);
59 
61 
62 #undef ARILES_BASIC_TYPE
63  };
64  } // namespace ns_ros
65 } // namespace ariles
Configuration reader class.
Definition: reader.h:28
#define ARILES_BASIC_TYPES_LIST
Definition: helpers.h:105
ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_SIGNED_INTEGER_TYPES_LIST) ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_UNSIGNED_INTEGER_TYPES_LIST) ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_REAL_TYPES_LIST) void Reader
Definition: reader.cpp:172
class ARILES_VISIBILITY_ATTRIBUTE Reader
Definition: reader.h:23
#define ARILES_VISIBILITY_ATTRIBUTE
Definition: helpers.h:69
Definition: basic.h:17