schema_editor/comdel/domain/pin.h

49 lines
948 B
C++

#ifndef DOMAIN_PIN_H
#define DOMAIN_PIN_H
#include "display.h"
#include "value.h"
#include <string>
namespace domain {
class Pin {
public:
enum PinType {
IN_OUT,
IN,
OUT
};
private:
std::string name;
PinType type;
std::string tooltip;
std::optional<std::string> connection;
domain::ui::Pin displayPin;
std::optional<std::vector<Value>> wires;
public:
Pin(std::string name, PinType type, std::string tooltip, std::optional<std::string> connection, domain::ui::Pin pin,
std::optional<std::vector<Value>> wires);
std::string &getName();
PinType getType();
std::string getTooltip();
ui::Pin &getDisplayPin();
std::optional<std::string> getConnection();
std::optional<std::vector<Value>> &getWires();
};
} // namespace domain
#endif // DOMAIN_PIN_H