20 lines
447 B
C++
20 lines
447 B
C++
#include "parts.hpp"
|
|
|
|
Part::Part(std::string name) : SystemElementContainer<Pin>(name), prnt(nullptr) {};
|
|
|
|
void Part::add(Pin *pin)
|
|
{
|
|
SystemElementContainer<Pin>::add(pin);
|
|
pin->prnt = this;
|
|
}
|
|
|
|
Part::~Part() {
|
|
for (const auto& [key, value] : content) {
|
|
delete value;
|
|
}
|
|
}
|
|
|
|
Parts::Parts(void): SystemElementContainer<Part>("parts") {}
|
|
|
|
Parts::Parts(std::vector<Part *> parts): SystemElementContainer<Part>("parts", parts) {}
|