##// END OF EJS Templates
variable time is now set to range graphe displayed when it is displayed...
variable time is now set to range graphe displayed when it is displayed in it

File last commit:

r287:9a5cb57f1573
r289:85f427f84e81
Show More
IDataSeries.h
59 lines | 1.5 KiB | text/x-c | CLexer
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117 #ifndef SCIQLOP_IDATASERIES_H
#define SCIQLOP_IDATASERIES_H
Alexandre Leroux
Centralization of qregistermetatype management
r285 #include <Common/MetaTypes.h>
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117
#include <memory>
Add merge API and implement it for the DataSeries
r217 #include <QString>
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117 template <int Dim>
class ArrayData;
Alexandre Leroux
Replaces QString unit by a new struct...
r164 struct Unit {
explicit Unit(const QString &name = {}, bool timeUnit = false)
: m_Name{name}, m_TimeUnit{timeUnit}
{
}
QString m_Name; ///< Unit name
bool m_TimeUnit; ///< The unit is a unit of time
};
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117 /**
* @brief The IDataSeries aims to declare a data series.
*
* A data series is an entity that contains at least :
* - one dataset representing the x-axis
* - one dataset representing the values
*
* Each dataset is represented by an ArrayData, and is associated with a unit.
*
* An ArrayData can be unidimensional or two-dimensional, depending on the implementation of the
* IDataSeries. The x-axis dataset is always unidimensional.
*
* @sa ArrayData
*/
class IDataSeries {
public:
virtual ~IDataSeries() noexcept = default;
/// Returns the x-axis dataset
virtual std::shared_ptr<ArrayData<1> > xAxisData() = 0;
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r287 /// Returns the x-axis dataset (as const)
virtual const std::shared_ptr<ArrayData<1> > xAxisData() const = 0;
Alexandre Leroux
Replaces QString unit by a new struct...
r164 virtual Unit xAxisUnit() const = 0;
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117
Alexandre Leroux
Replaces QString unit by a new struct...
r164 virtual Unit valuesUnit() const = 0;
Add merge API and implement it for the DataSeries
r217
virtual void merge(IDataSeries *dataSeries) = 0;
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r287
virtual std::unique_ptr<IDataSeries> clone() const = 0;
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117 };
Add merge API and implement it for the DataSeries
r217 // Required for using shared_ptr in signals/slots
Alexandre Leroux
Centralization of qregistermetatype management
r285 SCIQLOP_REGISTER_META_TYPE(IDATASERIES_PTR_REGISTRY, std::shared_ptr<IDataSeries>)
Add merge API and implement it for the DataSeries
r217
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r117 #endif // SCIQLOP_IDATASERIES_H