#pragma once #include "CircuitElement.h" #include "String.h" class Wire; class Terminal : public CircuitElement { public: enum class TerminalType { INPUT, OUTPUT }; Terminal(TerminalType type, const String& label = {}); Wire* getConnection() const; Type getType() const override { return mType == TerminalType::INPUT ? Type::INPUT_TERMINAL : Type::OUTPUT_TERMINAL; } void setConnection(Wire* connection); private: String mLabel; TerminalType mType; Wire* mConnection{ nullptr }; }; using TerminalPtr = Ptr;