Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps::core::DataTableColumn Class Referenceabstract

DataTable columns interface data type. More...

#include <column.h>

Inheritance diagram for hgps::core::DataTableColumn:
[legend]

Public Member Functions

 DataTableColumn ()=default
 Initialises a new instance of the DataTableColumn class.
 DataTableColumn (const DataTableColumn &)=delete
DataTableColumn & operator= (const DataTableColumn &)=delete
 DataTableColumn (DataTableColumn &&)=delete
DataTableColumn & operator= (DataTableColumn &&)=delete
virtual ~DataTableColumn ()=default
 Destroys a DataTableColumn instance.
virtual std::string type () const noexcept=0
 Gets the column type name.
virtual std::string name () const noexcept=0
 Gets the column name identifier.
virtual std::size_t null_count () const noexcept=0
 Gets the number of null values in the column data.
virtual std::size_t size () const noexcept=0
 The size of the column data, number of rows.
virtual bool is_null (std::size_t index) const noexcept=0
 Determine whether a column value is null.
virtual bool is_valid (std::size_t index) const noexcept=0
 Determine whether a column value is not null.
virtual const std::any value (std::size_t index) const noexcept=0
 Gets the column value at a given index.
virtual void accept (DataTableColumnVisitor &visitor) const =0
 Double dispatch the column using a visitor implementation.

Detailed Description

DataTable columns interface data type.

Constructor & Destructor Documentation

◆ DataTableColumn() [1/3]

hgps::core::DataTableColumn::DataTableColumn ( )
default

Initialises a new instance of the DataTableColumn class.

Here is the caller graph for this function:

◆ DataTableColumn() [2/3]

hgps::core::DataTableColumn::DataTableColumn ( const DataTableColumn & )
delete
Here is the call graph for this function:

◆ DataTableColumn() [3/3]

hgps::core::DataTableColumn::DataTableColumn ( DataTableColumn && )
delete
Here is the call graph for this function:

◆ ~DataTableColumn()

virtual hgps::core::DataTableColumn::~DataTableColumn ( )
virtualdefault

Destroys a DataTableColumn instance.

Member Function Documentation

◆ accept()

virtual void hgps::core::DataTableColumn::accept ( DataTableColumnVisitor & visitor) const
pure virtual

Double dispatch the column using a visitor implementation.

Parameters
visitorThe visitor instance to accept

Implemented in hgps::core::DoubleDataTableColumn, hgps::core::FloatDataTableColumn, hgps::core::IntegerDataTableColumn, and hgps::core::StringDataTableColumn.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_null()

virtual bool hgps::core::DataTableColumn::is_null ( std::size_t index) const
pure virtualnoexcept

Determine whether a column value is null.

Parameters
indexColumn index to check
Returns
true is the value is null; otherwise, false.

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_valid()

virtual bool hgps::core::DataTableColumn::is_valid ( std::size_t index) const
pure virtualnoexcept

Determine whether a column value is not null.

Parameters
indexColumn index to check
Returns
true is the value is not null; otherwise, false.

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

virtual std::string hgps::core::DataTableColumn::name ( ) const
pure virtualnoexcept

Gets the column name identifier.

Returns
Column name

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ null_count()

virtual std::size_t hgps::core::DataTableColumn::null_count ( ) const
pure virtualnoexcept

Gets the number of null values in the column data.

Returns
Column null values count

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

DataTableColumn & hgps::core::DataTableColumn::operator= ( const DataTableColumn & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

DataTableColumn & hgps::core::DataTableColumn::operator= ( DataTableColumn && )
delete
Here is the call graph for this function:

◆ size()

virtual std::size_t hgps::core::DataTableColumn::size ( ) const
pure virtualnoexcept

The size of the column data, number of rows.

Returns
Column size

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ type()

◆ value()

virtual const std::any hgps::core::DataTableColumn::value ( std::size_t index) const
pure virtualnoexcept

Gets the column value at a given index.

Parameters
indexColumn index
Returns
The value at index, if inside bounds; otherwise empty

Implemented in hgps::core::PrimitiveDataTableColumn< TYPE >, hgps::core::PrimitiveDataTableColumn< double >, hgps::core::PrimitiveDataTableColumn< float >, hgps::core::PrimitiveDataTableColumn< int >, and hgps::core::PrimitiveDataTableColumn< std::string >.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: