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 namespace ariles
14 {
15  namespace ns_yaml_cpp
16  {
17  namespace impl
18  {
20  }
21 
22 
23  /**
24  * @brief Configuration reader class
25  */
26  class ARILES_VISIBILITY_ATTRIBUTE Reader : public ns_yaml_cpp::Base<ariles::read::Visitor, impl::Reader>
27  {
28  protected:
29  std::size_t getMapSize(const bool /*expect_empty*/);
30 
31 
32 
33  public:
34  /**
35  * @brief Constructor
36  *
37  * @param[in] file_name
38  */
39  explicit Reader(const std::string &file_name);
40 
41 
42  /**
43  * @brief Constructor
44  *
45  * @param[in] input_stream
46  */
47  explicit Reader(std::istream &input_stream);
48 
49 
50 
51  bool descend(const std::string &child_name);
52  void ascend();
53 
54 
55  bool getMapEntryNames(std::vector<std::string> &child_names);
56 
57 
58  std::size_t startArray();
59  void shiftArray();
60  void endArray();
61 
62 
63 #define ARILES_BASIC_TYPE(type) void readElement(type &element);
64 
66 
67 #undef ARILES_BASIC_TYPE
68  };
69  } // namespace ns_yaml_cpp
70 } // namespace ariles
ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_INTEGER_TYPES_LIST) ARILES_MACRO_SUBSTITUTE(ARILES_BASIC_REAL_TYPES_LIST) void Writer
Definition: writer.cpp:200
#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:26