2 #include "nlohmann/json_fwd.hpp"
3 #include "util/uuid.hpp"
4 #include "common/lut.hpp"
7 #include "util/file_version.hpp"
18 enum class Direction {
37 Direction direction = Direction::INPUT;
39 static const std::vector<std::pair<Pin::Direction, std::string>> direction_names;
50 json serialize()
const;
51 UUID get_uuid()
const;
63 static Unit new_from_file(
const std::string &filename);
64 static unsigned int get_app_version();
68 std::string manufacturer;
69 std::map<UUID, Pin> pins;
72 json serialize()
const;
73 UUID get_uuid()
const;
Definition: file_version.hpp:9
A Pin represents a logical pin of a Unit.
Definition: unit.hpp:16
std::vector< std::string > names
The Pin's alternate names.
Definition: unit.hpp:48
unsigned int swap_group
Pins of the same swap_group can be pinswapped.
Definition: unit.hpp:44
std::string primary_name
The Pin's primary name.
Definition: unit.hpp:36
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
A Unit is the template for a Gate inside of an Entity.
Definition: unit.hpp:58
a class to store JSON values
Definition: json.hpp:177
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62