2 #include "nlohmann/json_fwd.hpp"
3 #include "util/uuid.hpp"
4 #include "common/lut.hpp"
9 #include "util/file_version.hpp"
20 enum class Direction {
39 Direction direction = Direction::INPUT;
41 static const std::vector<std::pair<Pin::Direction, std::string>> direction_names;
52 json serialize()
const;
53 UUID get_uuid()
const;
65 static Unit new_from_file(
const std::string &filename);
66 static unsigned int get_app_version();
70 std::string manufacturer;
71 std::map<UUID, Pin> pins;
74 json serialize()
const;
75 UUID get_uuid()
const;
Definition: file_version.hpp:8
A Pin represents a logical pin of a Unit.
Definition: unit.hpp:18
std::vector< std::string > names
The Pin's alternate names.
Definition: unit.hpp:50
unsigned int swap_group
Pins of the same swap_group can be pinswapped.
Definition: unit.hpp:46
std::string primary_name
The Pin's primary name.
Definition: unit.hpp:38
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:60
a class to store JSON values
Definition: json.hpp:166
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61