Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
column.h
Go to the documentation of this file.
1#pragma once
2#include <any>
3#include <string>
4#include <typeinfo>
5
6#include "visitor.h"
7
8namespace hgps::core {
9
12 public:
14 DataTableColumn() = default;
15
18
21
23 virtual ~DataTableColumn() = default;
24
27 virtual std::string type() const noexcept = 0;
28
31 virtual std::string name() const noexcept = 0;
32
36
39 virtual std::size_t size() const noexcept = 0;
40
44 virtual bool is_null(std::size_t index) const noexcept = 0;
45
49 virtual bool is_valid(std::size_t index) const noexcept = 0;
50
54 virtual const std::any value(std::size_t index) const noexcept = 0;
55
59};
60} // namespace hgps::core
DataTable column visitor interface.
Definition visitor.h:8
DataTable columns interface data type.
Definition column.h:11
virtual void accept(DataTableColumnVisitor &visitor) const =0
Double dispatch the column using a visitor implementation.
virtual bool is_valid(std::size_t index) const noexcept=0
Determine whether a column value is not null.
virtual std::size_t size() const noexcept=0
The size of the column data, number of rows.
DataTableColumn(const DataTableColumn &)=delete
virtual std::string type() const noexcept=0
Gets the column type name.
virtual const std::any value(std::size_t index) const noexcept=0
Gets the column value at a given index.
virtual std::size_t null_count() const noexcept=0
Gets the number of null values in the column data.
DataTableColumn & operator=(DataTableColumn &&)=delete
DataTableColumn()=default
Initialises a new instance of the DataTableColumn class.
virtual ~DataTableColumn()=default
Destroys a DataTableColumn instance.
DataTableColumn(DataTableColumn &&)=delete
DataTableColumn & operator=(const DataTableColumn &)=delete
virtual bool is_null(std::size_t index) const noexcept=0
Determine whether a column value is null.
virtual std::string name() const noexcept=0
Gets the column name identifier.
Top-level namespace for Health-GPS Core C++ API.
Definition analysis.h:7
Global namespace.
Definition column_iterator.h:123