8 #include <unordered_map>
19 using IteratorType = std::vector<std::unique_ptr<DataTableColumn>>::const_iterator;
63 std::vector<
std::
string> names_{};
64 std::unordered_map<std::string, std::size_t> index_{};
65 std::vector<std::unique_ptr<DataTableColumn>> columns_{};
66 size_t rows_count_ = 0;
67 std::mutex sync_mtx_{};
DataTable columns interface data type.
Definition: column.h:11
Defines a Datatable for in memory data class.
Definition: datatable.h:16
IteratorType cbegin() const noexcept
Gets the iterator to the first column of the table.
Definition: datatable.h:52
IteratorType cend() const noexcept
Gets the iterator element following the last column of the table.
Definition: datatable.h:56
std::size_t num_columns() const noexcept
Gets the number of columns.
Definition: datatable.cpp:9
std::size_t num_rows() const noexcept
Gets the number of rows.
Definition: datatable.cpp:11
std::vector< std::string > names() const
Gets the collection of columns name.
Definition: datatable.cpp:13
std::string to_string() const noexcept
Creates a string representation of the DataTable structure.
Definition: datatable.cpp:49
void add(std::unique_ptr< DataTableColumn > column)
Adds a new column to the table.
Definition: datatable.cpp:15
std::vector< std::unique_ptr< DataTableColumn > >::const_iterator IteratorType
DataTable columns iterator type.
Definition: datatable.h:19
const DataTableColumn & column(std::size_t index) const
Gets the column at a given index.
Definition: datatable.cpp:37
std::ostream & operator<<(std::ostream &stream, const hgps::core::DataTable &table)
Output streams operator for DataTable type.
Definition: datatable.cpp:74
Top-level namespace for Health-GPS Core C++ API.
Definition: analysis.h:7
Global namespace.
Definition: jsonparser.h:88