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  Gate(const UUID &uu, const YAML::Node &n, Pool &pool);
19  virtual UUID get_uuid() const;
20  UUID uuid;
21  std::string name;
22  std::string suffix;
23  unsigned int swap_group = 0;
25 
26  json serialize() const;
27  void serialize_yaml(YAML::Emitter &em) const;
28 };
29 } // 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:161
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