/*
File:        dataset.cpp
Description: This is a C++ source file containing implementation code handling configuration data
Rev:         0.1
Created:     20.03.2026
Author:      Uwe Jakobeit
Copyright:   Binder GmbH, TUT 2026
Purpose:     [Briefly describe the file's functionality, e.g., "Implements a class for managing user data."]
             Implementation of classes which provide changes of dataset without (re-)comiling
Notes:       [Any relevant details, such as dependencies, usage examples, or known issues.]
*/


#include "dataset.h"


using namespace std;

// Read config file and setup headlines ( characteristics )
Dataset::Dataset(QString& configFile)
{
    // headline << &mHeadLineTemperature
    //          << &mHeadLineHumidity
    //          << &mHeadLineOverheat;


    // Now you can create a QVector of pointers to QVectorBase
    QVector<QVectorBase*> mixedVectors;

//    QVector<QVectorBase*> mHeadlineVector;




    // Usage
    QVector<int> intVec = {1, 2, 3};
    QVector<double> dblVec = {1.0, 2, 3};

    QVector<QString> stringVec = {"hello", "world"};

    mixedVectors.append(new QVectorWrapper<int>(intVec));
    mixedVectors.append(new QVectorWrapper<QString>(stringVec));

    mHeadlineVector.append(new QVectorWrapper<int>(intVec));
    mHeadlineVector.append(new QVectorWrapper<QString>(stringVec));

    // Iterate and use polymorphic behavior
    for (QVectorBase* vec : mixedVectors) {
        vec->print();
    }
    // // Clean up
    // qDeleteAll(mixedVectors);
    // mixedVectors.clear();
}

QVectorBase* Dataset::HeadLine(uint8_t LineId)
{

    return mHeadlineVector.at(LineId);
}
