#include "LogsSorterConfigData.h"
#include <QDataStream>

CLogsSorterConfigData::CLogsSorterConfigData()
{

}

CLogsSorterConfigData& CLogsSorterConfigData::operator=(const CLogsSorterConfigData *source)
{
    if(source == this)
    {
        return *this;
    }

    this->mLogsSourceDirectory = source->mLogsSourceDirectory;
    this->mLogsFiltersList.clear();
    this->mLogsFiltersList = source->mLogsFiltersList;
}



QDataStream &operator>>(QDataStream &in, CLogsSorterConfigData &dest)
{
    in >> dest.mLogsSourceDirectory
       >> dest.mLogsFiltersList;


    return in;
}
QDataStream &operator<<(QDataStream &out, const CLogsSorterConfigData &source)
{
    out << source.mLogsSourceDirectory
        << source.mLogsFiltersList;

    return out;
}








///////////////////// CLogsFilterData definitions ///////////////////////////



CLogsFilterData& CLogsFilterData::operator=(const CLogsFilterData *source)
{
    if(source == this)
    {
        return *this;
    }

    this->mFilterName = source->mFilterName;
    this->mLogIdentificator = source->mLogIdentificator;
    this->mLogPrefix = source->mLogPrefix;
    this->mLogDestination = source->mLogDestination;
    this->mFilterOperation = source->mFilterOperation;

    return *this;
}

QDataStream &operator>>(QDataStream &in, CLogsFilterData &dest)
{
    in >> dest.mFilterName
       >> dest.mLogIdentificator
       >> dest.mLogPrefix
       >> dest.mLogDestination
       >> dest.mFilterOperation;

    return in;
}
QDataStream &operator<<(QDataStream &out, const CLogsFilterData &source)
{
    out << source.mFilterName
        << source.mLogIdentificator
        << source.mLogPrefix
        << source.mLogDestination
        << source.mFilterOperation;

    return out;
}
