Ariles
reader.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Jan Michalczyk
4  @author Alexander Sherikov
5 
6  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
7  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
8 
9  @copyright 2017-2018 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
10  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
11 
12  @brief
13 */
14 
15 #pragma once
16 
17 namespace ariles
18 {
19  namespace ns_yaml_cpp03
20  {
21  namespace impl
22  {
24  }
25 
26 
27  /**
28  * @brief Configuration reader class
29  */
30  class ARILES_VISIBILITY_ATTRIBUTE Reader : public ns_yaml_cpp03::Base<ariles::read::Visitor, impl::Reader>
31  {
32  protected:
33  std::size_t getMapSize(const bool /*expect_empty*/);
34 
35 
36  public:
37  /**
38  * @brief Constructor
39  *
40  * @param[in] file_name
41  */
42  explicit Reader(const std::string &file_name);
43 
44 
45  /**
46  * @brief Constructor
47  *
48  * @param[in] input_stream
49  */
50  explicit Reader(std::istream &input_stream);
51 
52 
53  bool descend(const std::string &child_name);
54  void ascend();
55 
56 
57  bool getMapEntryNames(std::vector<std::string> &child_names);
58 
59 
60  std::size_t startArray();
61  void shiftArray();
62  void endArray();
63 
64 
65 #define ARILES_BASIC_TYPE(type) void readElement(type &element);
66 
68 
69 #undef ARILES_BASIC_TYPE
70  };
71  } // namespace ns_yaml_cpp03
72 } // namespace ariles
ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_INTEGER_TYPES_LIST) ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_REAL_TYPES_LIST) void Writer
Definition: writer.cpp:195
#define ARILES_BASIC_TYPES_LIST
Definition: helpers.h:105
class ARILES_VISIBILITY_ATTRIBUTE Reader
Definition: reader.h:23
#define ARILES_VISIBILITY_ATTRIBUTE
Definition: helpers.h:69
Definition: basic.h:17
Configuration reader class.
Definition: reader.h:30