Class IDataArray¶
Defined in File IDataArray.hpp
Inheritance Relationships¶
Base Type¶
public nix::base::IEntityWithSources
(Class IEntityWithSources)
Class Documentation¶
-
class IDataArray : public virtual nix::base::IEntityWithSources¶
Interface for implementations of the DataArray entity.
See nix::DataArray for a more detailed description.
Public Functions
-
virtual boost::optional<std::string> label() const = 0¶
-
virtual void label(const std::string &label) = 0¶
-
virtual boost::optional<std::string> unit() const = 0¶
-
virtual void unit(const std::string &unit) = 0¶
-
virtual boost::optional<double> expansionOrigin() const = 0¶
-
virtual void expansionOrigin(double expansion_origin) = 0¶
-
virtual void polynomCoefficients(const std::vector<double> &polynom_coefficients, const Compression &compression) = 0¶
-
virtual std::vector<double> polynomCoefficients() const = 0¶
-
virtual std::shared_ptr<base::IDimension> getDimension(ndsize_t id) const = 0¶
-
virtual std::shared_ptr<base::ISetDimension> createSetDimension(ndsize_t id) = 0¶
-
virtual std::shared_ptr<base::IRangeDimension> createRangeDimension(ndsize_t id, const std::vector<double> &ticks) = 0¶
-
virtual std::shared_ptr<base::IRangeDimension> createAliasRangeDimension() = 0¶
-
virtual std::shared_ptr<base::ISampledDimension> createSampledDimension(ndsize_t id, double sampling_interval) = 0¶
-
virtual std::shared_ptr<base::IDataFrameDimension> createDataFrameDimension(ndsize_t id, const DataFrame &frame) = 0¶
-
virtual std::shared_ptr<base::IDataFrameDimension> createDataFrameDimension(ndsize_t id, const DataFrame &frame, unsigned column_index) = 0¶
-
virtual bool deleteDimensions() = 0¶
-
virtual void createData(DataType dtype, const NDSize &size, const Compression &compression) = 0¶
Create data for this data array.
The following example allocates a file space for a matrix of integers with 10 x 100 elements.
DataArray da = ...; if (!da.hasData()) { da.createData(DataType::Int32, {10, 100}); }
- Parameters
dtype – The data type that should be stored in this data array.
size – The size of the data to store.
compression – En-/disables compression for this DataArray
-
virtual bool hasData() const = 0¶
Check if the data array has some data.
- Returns
True if the array contains data, false otherwise.
-
virtual void write(DataType dtype, const void *data, const NDSize &count, const NDSize &offset) = 0¶
Write data into the data array.
- Parameters
dtype – The type of data to write (e.g. nix::DataType::Int32).
data – The data to write.
count – The size of the data to write.
offset – The position where the writing should start.
-
virtual void read(DataType dtype, void *buffer, const NDSize &count, const NDSize &offset) const = 0¶
Read data from the data array.
- Parameters
dtype – The type of data to read (e.g. nix::DataType::Int32).
buffer – Buffer where the data is written.
count – The size of the data to read.
offset – The position where the reading should start.
-
inline virtual ~IDataArray()¶
Destructor.
-
virtual boost::optional<std::string> label() const = 0¶