#include "GeneratorBase.h"

namespace routing {

GeneratorBase::GeneratorBase(QObject *parent)
    : GeneratorBase(nullptr, parent) {}

GeneratorBase::GeneratorBase(GeneratorBase::Data d, QObject *parent)
    : QObject(parent), _d(d) {
  establishConnections();
}

GeneratorBase::~GeneratorBase() {}

GeneratorBase::Data GeneratorBase::data() const { return _d; }

void GeneratorBase::setData(Data d) {
  if (d != _d && d != nullptr) {
    deleteConnections();
    _d = d;
    establishConnections();
    emit dataChanged();
  }
}

void GeneratorBase::establishConnections() {}

void GeneratorBase::deleteConnections() {}
} // namespace routing
