refactoring. Everything is pointer.
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
#include "pins.hpp"
|
||||
|
||||
Pin::Pin(std::string name) : SystemElement(name) {};
|
||||
Pin::Pin(std::string name) : SystemElement(name), sig(nullptr) {};
|
||||
|
||||
bool Pin::connected() {
|
||||
return sig != nullptr;
|
||||
}
|
||||
|
||||
void Pin::connect(Signal *signal)
|
||||
{
|
||||
sig = signal;
|
||||
}
|
||||
|
||||
Pins::Pins(void): SystemElementContainer<Pin>("pins") {}
|
||||
|
||||
Pins::Pins(std::vector<Pin> pins): SystemElementContainer<Pin>("pins", pins) {}
|
||||
Pins::Pins(std::vector<Pin *> pins): SystemElementContainer<Pin>("pins", pins) {}
|
||||
Reference in New Issue
Block a user