Horizon
net_class.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include "util/uuid.hpp"
4 #include "util/uuid_provider.hpp"
5 #include <stdint.h>
6 
7 namespace horizon {
8 using json = nlohmann::json;
9 
10 class NetClass : public UUIDProvider {
11 public:
12  NetClass(const UUID &uu, const json &j);
13  NetClass(const UUID &uu);
14  UUID uuid;
15  std::string name;
16  bool is_default = false;
17  UUID get_uuid() const;
18 
19  json serialize() const;
20 };
21 } // namespace horizon
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::NetClass
Definition: net_class.hpp:10
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:161
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::UUIDProvider
Interface for objects that have a UUID.
Definition: uuid_provider.hpp:9