Horizon
gate.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include "unit.hpp"
4 #include "util/uuid.hpp"
5 #include "util/uuid_provider.hpp"
6 #include "util/uuid_ptr.hpp"
7 #include <fstream>
8 #include <map>
9 #include <vector>
10 
11 namespace horizon {
12 using json = nlohmann::json;
13 
14 class Gate : public UUIDProvider {
15 public:
16  Gate(const UUID &uu, const json &, class Pool &pool);
17  Gate(const UUID &uu);
18  virtual UUID get_uuid() const;
19  UUID uuid;
20  std::string name;
21  std::string suffix;
22  unsigned int swap_group = 0;
24 
25  json serialize() const;
26 };
27 } // namespace horizon
horizon::uuid_ptr
Definition: uuid_ptr.hpp:9
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::Gate
Definition: gate.hpp:14
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::Pool
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:21
horizon::UUIDProvider
Interface for objects that have a UUID.
Definition: uuid_provider.hpp:9