2 #include "nlohmann/json_fwd.hpp" 3 #include "util/uuid.hpp" 4 #include "util/uuid_provider.hpp" 9 #include <yaml-cpp/yaml.h> 20 enum class Direction { INPUT, OUTPUT, BIDIRECTIONAL, OPEN_COLLECTOR, POWER_INPUT, POWER_OUTPUT, PASSIVE };
23 Pin(
const UUID &uu,
const YAML::Node &n);
31 Direction direction = Direction::INPUT;
42 json serialize()
const;
43 void serialize_yaml(YAML::Emitter &em)
const;
44 UUID get_uuid()
const;
56 static Unit new_from_file(
const std::string &filename);
58 Unit(
const UUID &uu,
const YAML::Node &n);
61 std::string manufacturer;
62 std::map<UUID, Pin> pins;
63 json serialize()
const;
64 void serialize_yaml(YAML::Emitter &em)
const;
65 UUID get_uuid()
const;
a class to store JSON values
Definition: json.hpp:161
Interface for objects that have a UUID.
Definition: uuid_provider.hpp:9
std::vector< std::string > names
The Pin's alternate names.
Definition: unit.hpp:40
A Unit is the template for a Gate inside of an Entity.
Definition: unit.hpp:51
unsigned int swap_group
Pins of the same swap_group can be pinswapped.
Definition: unit.hpp:36
A Pin represents a logical pin of a Unit.
Definition: unit.hpp:18
std::string primary_name
The Pin's primary name.
Definition: unit.hpp:30
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61