Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Primitive data type DataTable columns class. More...
#include <column_primitive.h>
Public Types | |
using | value_type = TYPE |
using | IteratorType = DataTableColumnIterator< PrimitiveDataTableColumn< TYPE > > |
Public Member Functions | |
PrimitiveDataTableColumn (std::string &&name, std::vector< TYPE > &&data) | |
Initialises a new instance of the PrimitiveDataTableColumn class. More... | |
PrimitiveDataTableColumn (std::string &&name, std::vector< TYPE > &&data, std::vector< bool > &&null_bitmap) | |
Initialises a new instance of the PrimitiveDataTableColumn class. More... | |
std::string | type () const noexcept override |
Gets the column type name. More... | |
std::string | name () const noexcept override |
Gets the column name identifier. More... | |
std::size_t | null_count () const noexcept override |
Gets the number of null values in the column data. More... | |
std::size_t | size () const noexcept override |
The size of the column data, number of rows. More... | |
bool | is_null (std::size_t index) const noexcept override |
Determine whether a column value is null. More... | |
bool | is_valid (std::size_t index) const noexcept override |
Determine whether a column value is not null. More... | |
const std::any | value (std::size_t index) const noexcept override |
Gets the column value at a given index. More... | |
const std::optional< value_type > | value_safe (const std::size_t index) const noexcept |
Gets the column value at a given index. More... | |
const value_type | value_unsafe (const std::size_t index) const |
Gets the column value at a given index, unsafe without boundary checks. More... | |
IteratorType | begin () const |
Gets the iterator to the first element of the column. More... | |
IteratorType | end () const |
Gets the iterator element following the last element of the column. More... | |
![]() | |
DataTableColumn ()=default | |
Initialises a new instance of the DataTableColumn class. More... | |
DataTableColumn (const DataTableColumn &)=delete | |
DataTableColumn & | operator= (const DataTableColumn &)=delete |
DataTableColumn (DataTableColumn &&)=delete | |
DataTableColumn & | operator= (DataTableColumn &&)=delete |
virtual | ~DataTableColumn () |
Destroys a DataTableColumn instance. More... | |
virtual void | accept (DataTableColumnVisitor &visitor) const =0 |
Double dispatch the column using a visitor implementation. More... | |
Primitive data type DataTable columns class.
TYPE | Column data type |
using hgps::core::PrimitiveDataTableColumn< TYPE >::IteratorType = DataTableColumnIterator<PrimitiveDataTableColumn<TYPE> > |
using hgps::core::PrimitiveDataTableColumn< TYPE >::value_type = TYPE |
|
inlineexplicit |
Initialises a new instance of the PrimitiveDataTableColumn class.
name | Column name |
data | Column data |
std::invalid_argument | for column name starting with non-alpha character or less than two length. |
|
inlineexplicit |
Initialises a new instance of the PrimitiveDataTableColumn class.
name | Column name |
data | Column data, which may contain null values |
null_bitmap | Column null values index |
std::invalid_argument | for column name starting with non-alpha character or less than two length. |
std::out_of_range | for data and null bitmap vectors size mismatch. |
|
inline |
Gets the iterator to the first element of the column.
|
inline |
Gets the iterator element following the last element of the column.
|
inlineoverridevirtualnoexcept |
Determine whether a column value is null.
index | Column index to check |
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
Determine whether a column value is not null.
index | Column index to check |
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
Gets the column name identifier.
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
Gets the number of null values in the column data.
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
The size of the column data, number of rows.
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
Gets the column type name.
Implements hgps::core::DataTableColumn.
|
inlineoverridevirtualnoexcept |
Gets the column value at a given index.
index | Column index |
Implements hgps::core::DataTableColumn.
|
inlinenoexcept |
Gets the column value at a given index.
index | Column index |
|
inline |
Gets the column value at a given index, unsafe without boundary checks.
index | Column index |