19#ifndef TABLECOLUMN_HPP
20#define TABLECOLUMN_HPP
25#include "../ParserLib/muParserDef.h"
26#include "../structures.hpp"
68 virtual void setValue(
size_t elem,
const std::string& sValue) = 0;
81 virtual void resize(
size_t elem) = 0;
83 virtual int compare(
int i,
int j,
bool flag)
const = 0;
86 virtual bool asBool(
int elem)
const = 0;
88 virtual size_t size()
const = 0;
This class abstracts all the index logics, i.e. the logical differences between single indices and in...
MUP_BASETYPE value_type
The numeric datatype used by the parser.
Abstract table column, which allows using it to compose the data table in each Memory instance.
virtual bool isValid(int elem) const =0
void shrink()
Shrink the column by removing all invalid elements from the end.
std::vector< std::string > getValueAsInternalString(const VectorIndex &idx) const
Returns the table column's contents as a vector containing internal strings.
size_t getNumFilledElements() const
Return the number of actual filled elements in this column, which can be different from the actual si...
TableColumn * copy() const
Simplification wrapper around the indiced copy method to copy the whole column.
static ColumnType stringToType(const std::string &sType)
Converts the passed string representation to a ColumnType value.
virtual size_t size() const =0
virtual TableColumn * convert(ColumnType type=TableColumn::TYPE_NONE)=0
std::vector< mu::value_type > getValue(const VectorIndex &idx) const
Return the table column's contents as a vector of numerical types.
virtual TableColumn * copy(const VectorIndex &idx) const =0
virtual void resize(size_t elem)=0
virtual std::string getValueAsParserString(size_t elem) const =0
virtual void insert(const VectorIndex &idx, const TableColumn *column)=0
virtual void appendElements(size_t elem)=0
virtual std::string getValueAsStringLiteral(size_t elem) const =0
virtual void setValue(size_t elem, const std::string &sValue)=0
static std::string getDefaultColumnHead(size_t colNo)
Creates a default column headline for a column, which can be used without an instance of this class.
virtual void insertElements(size_t pos, size_t elem)=0
virtual void removeElements(size_t pos, size_t elem)=0
virtual std::string getValueAsInternalString(size_t elem) const =0
static std::string typeToString(ColumnType type)
Converts the passed ColumnType value to a string representation.
virtual void deleteElements(const VectorIndex &idx)=0
virtual std::string getValueAsString(size_t elem) const =0
virtual void assign(const TableColumn *column)=0
virtual bool asBool(int elem) const =0
std::vector< std::string > getValueAsString(const VectorIndex &idx) const
Return the table column's contents as a vector of strings.
virtual void setValue(size_t elem, const mu::value_type &vValue)=0
virtual size_t getBytes() const =0
virtual int compare(int i, int j, bool flag) const =0
virtual mu::value_type getValue(size_t elem) const =0
static std::vector< std::string > getTypesAsString()
Returns a list of all available column types as strings.
void setValue(const VectorIndex &idx, const std::vector< std::string > &vValue)
Sets a string vector at the specified indices.
std::unique_ptr< TableColumn > TblColPtr
Typedef for simplifying the usage of a smart pointer in combination with a TableColumn instance.
std::vector< TblColPtr > TableColumnArray
This typedef represents the actual table, which is implemented using a std::vector.