##// END OF EJS Templates
Creates enum that represents the value types that can be read in AMDA...
Creates enum that represents the value types that can be read in AMDA This enum is passed in parameter of the reading method to parse the result file according to it

File last commit:

r543:0ff42e877af8
r563:a08e6992e146
Show More
Variable.h
65 lines | 1.9 KiB | text/x-c | CLexer
#ifndef SCIQLOP_VARIABLE_H
#define SCIQLOP_VARIABLE_H
#include "CoreGlobal.h"
#include <Data/SqpRange.h>
#include <QLoggingCategory>
#include <QObject>
#include <Common/MetaTypes.h>
#include <Common/spimpl.h>
Q_DECLARE_LOGGING_CATEGORY(LOG_Variable)
class IDataSeries;
class QString;
/**
* @brief The Variable class represents a variable in SciQlop.
*/
class SCIQLOP_CORE_EXPORT Variable : public QObject {
Q_OBJECT
public:
explicit Variable(const QString &name, const SqpRange &dateTime,
const QVariantHash &metadata = {});
QString name() const noexcept;
SqpRange range() const noexcept;
void setRange(const SqpRange &range) noexcept;
SqpRange cacheRange() const noexcept;
void setCacheRange(const SqpRange &cacheRange) noexcept;
/// @return the data of the variable, nullptr if there is no data
std::shared_ptr<IDataSeries> dataSeries() const noexcept;
QVariantHash metadata() const noexcept;
bool contains(const SqpRange &range) const noexcept;
bool intersect(const SqpRange &range) const noexcept;
bool isInside(const SqpRange &range) const noexcept;
bool cacheContains(const SqpRange &range) const noexcept;
bool cacheIntersect(const SqpRange &range) const noexcept;
bool cacheIsInside(const SqpRange &range) const noexcept;
QVector<SqpRange> provideNotInCacheRangeList(const SqpRange &range) const noexcept;
void setDataSeries(std::shared_ptr<IDataSeries> dataSeries) noexcept;
void mergeDataSeries(std::shared_ptr<IDataSeries> dataSeries) noexcept;
signals:
void updated();
private:
class VariablePrivate;
spimpl::unique_impl_ptr<VariablePrivate> impl;
};
// Required for using shared_ptr in signals/slots
SCIQLOP_REGISTER_META_TYPE(VARIABLE_PTR_REGISTRY, std::shared_ptr<Variable>)
SCIQLOP_REGISTER_META_TYPE(VARIABLE_PTR_VECTOR_REGISTRY, QVector<std::shared_ptr<Variable> >)
#endif // SCIQLOP_VARIABLE_H