ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Yaml.hpp
Go to the documentation of this file.
1 
6 #ifndef IFW_CTD_YAML_HPP_
7 #define IFW_CTD_YAML_HPP_
8 
9 #include <string>
10 
11 #include <yaml-cpp/yaml.h>
12 
13 #include "ctd/defines/defines.hpp"
14 #include "ctd/file/ParameterSet.hpp"
15 
16 
17 namespace ctd {
18 namespace file {
19 
24 class Yaml: public ParameterSet {
25 public:
26 
27  Yaml();
28 
29  ~Yaml();
30 
50  virtual void LoadUser(const std::string& file_name,
51  const bool merge = false);
52 
53 protected:
54 
55 private:
56  void _ParseNode(YAML::Node node,
57  int32_t depth,
58  std::string cur_path,
59  const std::string& sub_path);
60 };
61 
62 } // namespace ctd
63 } // namespace file
64 
65 
66 #endif // !IFW_CTD_YAML_HPP_
Yaml()
Definition: Yaml.cpp:11
virtual void LoadUser(const std::string &file_name, const bool merge=false)
Load the Yaml file and convert its contents into a dictionary.
Definition: Yaml.cpp:64
~Yaml()
Definition: Yaml.cpp:15