##// END OF EJS Templates
Implements color scale loading when the editor is open
Implements color scale loading when the editor is open

File last commit:

r988:99f1718ec669
r1011:9104d7a70c66
Show More
IDataSeries.h
102 lines | 3.5 KiB | text/x-c | CLexer
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125 #ifndef SCIQLOP_IDATASERIES_H
#define SCIQLOP_IDATASERIES_H
Alexandre Leroux
Centralization of qregistermetatype management
r308 #include <Common/MetaTypes.h>
Alexandre Leroux
Moves cbegin() and cend() declarations in IDataSeries...
r597 #include <Data/DataSeriesIterator.h>
Implementation of V5 acquisition
r539 #include <Data/SqpRange.h>
Alexandre Leroux
Minor changes...
r858 #include <Data/Unit.h>
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125
#include <memory>
Add merge API and implement it for the DataSeries
r233 #include <QString>
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125 template <int Dim>
class ArrayData;
/**
* @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
r310 /// 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...
r177 virtual Unit xAxisUnit() const = 0;
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125
Alexandre Leroux
Updates access to y-axis properties of the data series (1)...
r988 /// @return the y-axis unit, if axis is defined, default unit otherwise
virtual Unit yAxisUnit() const = 0;
Alexandre Leroux
Replaces QString unit by a new struct...
r177 virtual Unit valuesUnit() const = 0;
Add merge API and implement it for the DataSeries
r233
virtual void merge(IDataSeries *dataSeries) = 0;
Alexandre Leroux
Implements purge() method for DataSeries
r676 /// Removes from data series all entries whose value on the x-axis is not between min and max
virtual void purge(double min, double max) = 0;
Alexandre Leroux
Renames subData() to subDataSeries()...
r554 /// @todo Review the name and signature of this method
virtual std::shared_ptr<IDataSeries> subDataSeries(const SqpRange &range) = 0;
Alexandre Leroux
Use std::shared_ptr in CosinusProvider
r310
virtual std::unique_ptr<IDataSeries> clone() const = 0;
Alexandre Leroux
Creates method to retrieve nb points of a data series
r717
/// @return the total number of points contained in the data series
virtual int nbPoints() const = 0;
Alexandre Leroux
Updates access to y-axis properties of the data series (1)...
r988 /// @return the bounds of the y-axis axis (if defined)
virtual std::pair<double, double> yBounds() const = 0;
Alexandre Leroux
Moves cbegin() and cend() declarations in IDataSeries...
r597 // ///////// //
// Iterators //
// ///////// //
virtual DataSeriesIterator cbegin() const = 0;
virtual DataSeriesIterator cend() const = 0;
Alexandre Leroux
Adapts SqpIterator to make non-const iterators
r673 virtual DataSeriesIterator begin() = 0;
virtual DataSeriesIterator end() = 0;
Alexandre Leroux
Moves cbegin() and cend() declarations in IDataSeries...
r597
Alexandre Leroux
Shows min x-axis data in Variable widget (1)...
r599 /// @return the iterator to the first entry of the data series whose x-axis data is greater than
/// or equal to the value passed in parameter, or the end iterator if there is no matching value
Alexandre Leroux
(Refactoring) Renames IDataSeries::minData() and IDataSeries::maxData()
r604 virtual DataSeriesIterator minXAxisData(double minXAxisData) const = 0;
Alexandre Leroux
Shows min x-axis data in Variable widget (1)...
r599
Alexandre Leroux
Shows min/max x-axis data in Variable widget (2)...
r600 /// @return the iterator to the last entry of the data series whose x-axis data is less than or
/// equal to the value passed in parameter, or the end iterator if there is no matching value
Alexandre Leroux
(Refactoring) Renames IDataSeries::minData() and IDataSeries::maxData()
r604 virtual DataSeriesIterator maxXAxisData(double maxXAxisData) const = 0;
Alexandre Leroux
Shows min/max x-axis data in Variable widget (2)...
r600
Alexandre Leroux
(Refactoring) Renames IDataSeries::subData()
r605 /// @return the iterators pointing to the range of data whose x-axis values are between min and
/// max passed in parameters
virtual std::pair<DataSeriesIterator, DataSeriesIterator>
xAxisRange(double minXAxisData, double maxXAxisData) const = 0;
Alexandre Leroux
Moves cbegin() and cend() declarations in IDataSeries...
r597
Alexandre Leroux
Implements method to get min/max values of a dataseries giving a range (1)
r608 /// @return two iterators pointing to the data that have respectively the min and the max value
/// data of a data series' range. The search is performed for a given x-axis range.
/// @sa xAxisRange()
virtual std::pair<DataSeriesIterator, DataSeriesIterator>
valuesBounds(double minXAxisData, double maxXAxisData) const = 0;
Alexandre Leroux
Moves cbegin() and cend() declarations in IDataSeries...
r597 // /////// //
// Mutexes //
// /////// //
Add current progression for thread fix
r364 virtual void lockRead() = 0;
virtual void lockWrite() = 0;
virtual void unlock() = 0;
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125 };
Add merge API and implement it for the DataSeries
r233 // Required for using shared_ptr in signals/slots
Alexandre Leroux
Centralization of qregistermetatype management
r308 SCIQLOP_REGISTER_META_TYPE(IDATASERIES_PTR_REGISTRY, std::shared_ptr<IDataSeries>)
Add merge API and implement it for the DataSeries
r233
Alexandre Leroux
Creates IDataSeries interface and its default implementation
r125 #endif // SCIQLOP_IDATASERIES_H