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