|
IOLink
IOL_v1.6.1_release
|
5 #include <iolink/DataType.h>
6 #include <iolink/FlagSet.h>
7 #include <iolink/IOLinkAPI.h>
8 #include <iolink/VectorX.h>
9 #include <iolink/view/View.h>
26 extern template class IOLINK_API_IMPORT FlagSet<DataFrameCapability>;
72 virtual const std::string& columnName(
size_t index)
const = 0;
81 virtual size_t columnIndex(
const std::string& name)
const = 0;
90 virtual DataType columnDataType(
size_t index)
const = 0;
120 virtual void read(
size_t column,
size_t offset,
size_t count,
void* dst)
const;
134 template <
typename T>
135 inline T
at(
size_t column,
size_t row)
const
138 this->read(column, row, 1, &value);
155 template <
typename T>
156 inline T
at(
const std::string& columnName,
size_t row)
const
158 return this->at<T>(this->columnIndex(columnName), row);
189 virtual void write(
size_t column,
size_t offset,
size_t count,
const void* src);
203 template <
typename T>
204 inline void setAt(
size_t column,
size_t row, T value)
206 this->write(column, row, 1, &value);
221 template <
typename T>
222 inline void setAt(
const std::string& columnName,
size_t row, T value)
224 this->setAt<T>(this->columnIndex(columnName), row, value);
245 virtual void addColumn(
const std::string& name,
DataType dtype);
263 virtual void addRows(
size_t offset,
size_t count);
276 virtual void removeColumn(
size_t index);
290 virtual void removeRows(
size_t offset,
size_t count);
295 std::string toString()
const;
DataFrameCapability
Capabilities of dataframes instances.
Definition: DataFrameView.h:19
Stores information about a data type.
Definition: DataType.h:161
All IOLink symbols are enclosed in this namespace.
Definition: ArrayX.h:7
@ READ
Ability to read column data.
Interface representing a generic view on data.
Definition: View.h:15
View to model tabular data.
Definition: DataFrameView.h:46
@ WRITE
Ability to write column data.
Template class to handle a flags system from an enum.
Definition: FlagSet.h:42
void setAt(const std::string &columnName, size_t row, T value)
Set the element value in a cell of the data frame.
Definition: DataFrameView.h:222
void setAt(size_t column, size_t row, T value)
Set the element value in a cell of the data frame.
Definition: DataFrameView.h:204
T at(const std::string &columnName, size_t row) const
Get the value stored in a cell of the data frame.
Definition: DataFrameView.h:156
T at(size_t column, size_t row) const
Get the value stored in a cell of the data frame.
Definition: DataFrameView.h:135
An arithmetic vector.
Definition: Vector.h:36
@ RESHAPE
Ability to add or remove columns and rows.