Horizon
file_version.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include "common/common.hpp"
4 
5 namespace horizon {
6 using json = nlohmann::json;
7 
8 class FileVersion {
9 public:
10  FileVersion(unsigned int a);
11  FileVersion(unsigned int a, unsigned int f);
12  FileVersion(unsigned int a, const json &j);
13 
14  unsigned int get_app() const
15  {
16  return app;
17  }
18 
19  unsigned int get_file() const
20  {
21  return file;
22  }
23 
24  void serialize(json &j) const;
25 
26  void check(ObjectType type, const std::string &name, const class UUID &uu) const;
27 
28  std::string get_message(ObjectType type) const;
29 
30 private:
31  unsigned int app = 0;
32  unsigned int file = 0;
33 };
34 
35 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61