|
icedb
version 0.5.1
Snow particle scattering database API
|
The virtual base class used in all objects that can contain tables (groups and datasets). More...
#include <Table.hpp>

Public Member Functions | |
| ~CanHaveTables () | |
| std::set< std::string > | getTableNames () const |
| Lists all table names that are children of this object. More... | |
| bool | doesTableExist (const std::string &tableName) const |
| Does a table exist with the given name. More... | |
| void | unlinkTable (const std::string &tableName) |
| Unlink a table. In HDF5, this is not the same as erasing a table, which never actually happens. More... | |
| Table::Table_Type | openTable (const std::string &tableName) |
| std::vector< size_t > | getChunkStrategy (const std::vector< size_t > &dims) |
| The default chunking strategy for this table. Used for storage i/o speed, and for compression. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, const std::vector< size_t > &dims, const std::vector< size_t > *chunks=nullptr) |
| Create a table. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, std::initializer_list< size_t > dims, const std::vector< size_t > *chunks=nullptr) |
| Create a table. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, std::initializer_list< size_t > dims, std::initializer_list< DataType > data, const std::vector< size_t > *chunks=nullptr) |
| Create a table and writes initial data. Used with small tables. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, std::initializer_list< size_t > dims, const std::vector< DataType > &data, const std::vector< size_t > *chunks=nullptr) |
| Create a table and sets the table's initial data. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, std::initializer_list< size_t > dims, const gsl::span< DataType > &data, const std::vector< size_t > *chunks=nullptr) |
| Create a table and sets the table's initial data. More... | |
| template<class DataType > | |
| Table::Table_Type | createTable (const std::string &tableName, std::initializer_list< size_t > dims, const gsl::span< const DataType > &data, const std::vector< size_t > *chunks=nullptr) |
| Create a table and sets the table's initial data. More... | |
Protected Member Functions | |
| CanHaveTables () | |
| Trivial constructor used when CanHaveTables is a virtual base class. More... | |
| virtual void | _setTablesParent (std::shared_ptr< H5::Group > obj)=0 |
| CanHaveTables needs post-constructor setup. This sets the base HDF5 object that gets manipulated. More... | |
| virtual std::shared_ptr< H5::Group > | _getTablesParent () const =0 |
| Gets the base HDF5 object that is manipulated. More... | |
Private Member Functions | |
| bool | valid () const |
| Checks that the class is well-formed, constructed and activated. CanHaveTables needs post-constructor setup. More... | |
| void | _createTable (const std::string &tableName, const std::type_index &type, const std::vector< size_t > &dims, const std::vector< size_t > &chunks) |
| Internal function to create a table. Does not write data. More... | |
The virtual base class used in all objects that can contain tables (groups and datasets).
|
protected |
Trivial constructor used when CanHaveTables is a virtual base class.
Definition at line 245 of file Tables.cpp.
| icedb::Tables::CanHaveTables::~CanHaveTables | ( | ) |
Definition at line 246 of file Tables.cpp.
|
private |
Internal function to create a table. Does not write data.
| tableName | is the name of the table. |
| type | is the type of the table. |
| dims | are the dimensions of the table. |
| chunks | are the HDF5 chunking parameters, used when writing a table. |
Definition at line 250 of file Tables.cpp.
References icedb::fs::hdf5::useZLIB(), and icedb::Tables::Table::valid().

|
protectedpure virtual |
Gets the base HDF5 object that is manipulated.
Implemented in icedb::Tables::CanHaveTables_impl.
|
protectedpure virtual |
CanHaveTables needs post-constructor setup. This sets the base HDF5 object that gets manipulated.
Implemented in icedb::Tables::CanHaveTables_impl.
|
inline |
Create a table.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
Definition at line 172 of file Table.hpp.
|
inline |
Create a table.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
|
inline |
Create a table and writes initial data. Used with small tables.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| data | are the initial data of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
|
inline |
Create a table and sets the table's initial data.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| data | are the data of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
|
inline |
Create a table and sets the table's initial data.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| data | are the data of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
|
inline |
Create a table and sets the table's initial data.
| DataType | is the type of the data |
| tableName | is the name of the table |
| if | a table with this name already exists |
| if | the base object is read only |
| dims | are the dimensions of the table |
| data | are the data of the table |
| chunks | is the size of each N-dimensional chunk, used for storage and compression. HDF5 writes each table as a group of chunked objects. When reading or writing, entire chunks are always read or written. |
| bool icedb::Tables::CanHaveTables::doesTableExist | ( | const std::string & | tableName | ) | const |
Does a table exist with the given name.
Definition at line 309 of file Tables.cpp.
|
inline |
| std::set< std::string > icedb::Tables::CanHaveTables::getTableNames | ( | ) | const |
Lists all table names that are children of this object.
Definition at line 297 of file Tables.cpp.
References icedb::fs::hdf5::getGroupMembersTypes(), and icedb::Tables::Table::valid().

| Table::Table_Type icedb::Tables::CanHaveTables::openTable | ( | const std::string & | tableName | ) |
Open the table with the matching name.
| if | a table with this name does not exist. |
Definition at line 321 of file Tables.cpp.
References icedb::Tables::Table::valid().

| void icedb::Tables::CanHaveTables::unlinkTable | ( | const std::string & | tableName | ) |
Unlink a table. In HDF5, this is not the same as erasing a table, which never actually happens.
| if | a table with name tableName does not exist. |
| if | the open file is read only |
Definition at line 315 of file Tables.cpp.
References icedb::Tables::Table::valid().

|
private |
Checks that the class is well-formed, constructed and activated. CanHaveTables needs post-constructor setup.
Definition at line 247 of file Tables.cpp.
1.8.13