##// END OF EJS Templates
Sets the name of the plugin for products and components...
Sets the name of the plugin for products and components Since there is only one common root in the data source widget, it is no longer possible to retrieve on the fly the name of the plugin in which a component or product is located. This name is therefore attached to their creation.

File last commit:

r870:05c98ddf38b8
r1076:9c3bb5e93c54
Show More
DataSeriesBuilders.h
74 lines | 2.2 KiB | text/x-c | CLexer
/ core / tests / Data / DataSeriesBuilders.h
#ifndef SCIQLOP_DATASERIESBUILDERS_H
#define SCIQLOP_DATASERIESBUILDERS_H
#include <memory>
#include <vector>
class ScalarSeries;
class SpectrogramSeries;
class VectorSeries;
/**
* @brief The ScalarBuilder class aims to facilitate the creation of a ScalarSeries for unit tests
* @sa ScalarSeries
*/
class ScalarBuilder {
public:
/// Sets x-axis data of the series
ScalarBuilder & setX(std::vector<double> xData);
/// Sets values data of the series
ScalarBuilder & setValues(std::vector<double> valuesData);
/// Creates the series
std::shared_ptr<ScalarSeries> build();
private:
std::vector<double> m_XAxisData{};
std::vector<double> m_ValuesData{};
};
/**
* @brief The SpectrogramBuilder class aims to facilitate the creation of a SpectrogramSeries for unit tests
* @sa SpectrogramSeries
*/
class SpectrogramBuilder {
public:
/// Sets x-axis data of the series
SpectrogramBuilder & setX(std::vector<double> xData);
/// Sets y-axis data of the series
SpectrogramBuilder & setY(std::vector<double> yData);
/// Sets values data of the series
SpectrogramBuilder & setValues(std::vector<double> valuesData);
/// Creates the series
std::shared_ptr<SpectrogramSeries> build();
private:
std::vector<double> m_XAxisData{};
std::vector<double> m_YAxisData{};
std::vector<double> m_ValuesData{};
};
/**
* @brief The VectorBuilder class aims to facilitate the creation of a VectorSeries for unit tests
* @sa VectorSeries
*/
class VectorBuilder {
public:
/// Sets x-axis data of the series
VectorBuilder & setX(std::vector<double> xData);
/// Sets x-values data of the series
VectorBuilder & setXValues(std::vector<double> xValuesData);
/// Sets y-values data of the series
VectorBuilder & setYValues(std::vector<double> yValuesData);
/// Sets z-values data of the series
VectorBuilder & setZValues(std::vector<double> zValuesData);
/// Creates the series
std::shared_ptr<VectorSeries> build();
private:
std::vector<double> m_XAxisData{};
std::vector<double> m_XValuesData{};
std::vector<double> m_YValuesData{};
std::vector<double> m_ZValuesData{};
};
#endif // SCIQLOP_DATASERIESBUILDERS_H