#include "WimaVCorridor.h"

const char* WimaVCorridor::wimaVCorridorName = "Corridor";



WimaVCorridor::WimaVCorridor(QObject *parent)
    : WimaArea (parent)
{
    init();
}

WimaVCorridor::WimaVCorridor(const WimaVCorridor &other, QObject *parent)
    : WimaArea (other, parent)
{
    init();
}

void WimaVCorridor::saveToJson(QJsonObject &json)
{
    this->WimaArea::saveToJson(json);
    json[areaTypeName] = wimaVCorridorName;
}

bool WimaVCorridor::loadFromJson(const QJsonObject &json, QString &errorString)
{
    if ( this->WimaArea::loadFromJson(json, errorString)) {
        bool retVal = true;
        // code for loading here
        return retVal;
    } else {
        qWarning() << errorString;
        return false;
    }
}

void WimaVCorridor::update(const WimaVCorridor &area)
{
    this->WimaArea::update(area);
}

void WimaVCorridor::init()
{
    this->setObjectName(wimaVCorridorName);
}

void print(const WimaVCorridor &area)
{
    QString message;
    print(area, message);
    qWarning() << message;
}

void print(const WimaVCorridor &area, QString &outputString)
{
    print(static_cast<const WimaArea&>(area), outputString);
}
