#include "cdac.h"
#include <QString>

cdac::cdac()
{

}

const std::string &cdac::name() const
{
    return m_name;
}

void cdac::setName(const std::string &newName)
{
    m_name = newName;
}

double cdac::outputLevel() const
{
    return m_outputLevel;
}

void cdac::setOutputLevel(double newOutputLevel)
{
    m_outputLevel = newOutputLevel;
}

QDataStream& operator >>(QDataStream& in, cdac& dac){
    QString name;
    in >> name;
    dac.m_name=name.toStdString();
    qreal outputLevel;
    in >>outputLevel;
    dac.setOutputLevel((double)outputLevel);

    return in;
}
QDataStream& operator <<(QDataStream& out,cdac& dac){
    out << QString::fromStdString(dac.name());
    out << qreal(dac.outputLevel());
    return out;
}
