icedb  version 0.5.1
Snow particle scattering database API
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
icedb::Tables::Table_impl Class Reference

#include <Table_impl.hpp>

Inheritance diagram for icedb::Tables::Table_impl:
Inheritance graph
[legend]
Collaboration diagram for icedb::Tables::Table_impl:
Collaboration graph
[legend]

Public Member Functions

virtual ~Table_impl ()
 
 Table_impl (std::shared_ptr< H5::DataSet > obj, const std::string &name="")
 
- Public Member Functions inherited from icedb::Tables::Table
virtual ~Table ()
 
size_t getNumDimensions () const
 Returns the number of dimensions of a table. More...
 
Dimensions_Type getDimensions () const
 Returns a vector containing the dimensions of the table. More...
 
void attachDimensionScale (size_t DimensionNumber, gsl::not_null< const Table *> scale)
 
void detachDimensionScale (size_t DimensionNumber, gsl::not_null< const Table *> scale)
 Detaches a dimension scale from this table. More...
 
bool isDimensionScale () const
 Is this Table used as a dimension scale? More...
 
void setDimensionScale (const std::string &dimensionScaleName)
 Designate this table as a dimension scale. More...
 
void setDimensionScaleAxisLabel (size_t DimensionNumber, const std::string &label)
 Set the axis label for the dimension designated by DimensionNumber. More...
 
std::string getDimensionScaleAxisLabel (size_t DimensionNumber) const
 Get the axis label for the dimension designated by DimensionNumber. More...
 
std::string getDimensionScaleName () const
 Get the name of this table's defined dimension scale. More...
 
template<class Type >
bool isTableOfType () const
 Check if this table has the matching Type. More...
 
std::type_index getTableTypeId () const
 Get the type of the table (i.e. int64_t, float, etc.) More...
 
template<class DataType >
void readAll (std::vector< size_t > &dims, std::vector< DataType > &data) const
 Read all of the data in the associated table. More...
 
template<class DataType >
void writeAll (const gsl::span< const DataType > &outData) const
 Write the passed data to the table. Writes whole table. More...
 
template<class DataType >
void writeAll (const gsl::span< DataType > &outData) const
 Write the passed data to the table. Writes whole table. More...
 
template<class DataType >
void writeAll (const std::vector< DataType > &outData) const
 Write the passed data to the table. Writes whole table. Convenience converter function. More...
 
- Public Member Functions inherited from icedb::Attributes::CanHaveAttributes
 ~CanHaveAttributes ()
 
bool doesAttributeExist (const std::string &attributeName) const
 Does the object have an attribute with the given name? More...
 
std::type_index getAttributeTypeId (const std::string &attributeName) const
 Returns the type of an attribute. More...
 
template<class Type >
bool isAttributeOfType (const std::string &attributeName) const
 Is the type of the attribute "Type"? More...
 
std::set< std::string > getAttributeNames () const
 List all attributes attached to this object. More...
 
void deleteAttribute (const std::string &attributeName)
 Delete an attribute, by name, that is attached to this object. More...
 
template<class DataType >
void readAttributeData (const std::string &attributeName, std::vector< size_t > &dimensions, std::vector< DataType > &data) const
 Function to read the data from an attribute using the provided input vectors. More...
 
template<class DataType >
void writeAttributeData (const std::string &attributeName, const std::vector< size_t > &dimensionas, const std::vector< DataType > &data)
 Function to write an attribute to an object, with the provided raw data. More...
 
template<class DataType >
Attribute< DataType > readAttribute (const std::string &attributeName) const
 Convenience function to read an attribute's data and return an Attribute object. More...
 
template<class DataType >
void writeAttribute (const Attribute< DataType > &attribute)
 Convenience function to write an Attribute to an object. More...
 
template<class DataType >
void writeAttribute (const std::string &name, std::initializer_list< size_t > dims, std::initializer_list< DataType > data)
 Convenience function to write a small Attribute to an object, using initializer lists. More...
 
- Public Member Functions inherited from icedb::Attributes::CanHaveAttributes_impl
 CanHaveAttributes_impl (std::shared_ptr< H5::H5Object >)
 
 CanHaveAttributes_impl ()
 
virtual ~CanHaveAttributes_impl ()
 

Protected Member Functions

void _setTableSelf (std::shared_ptr< H5::DataSet > obj) override
 Associates the icedb table with the fundamental HDF5 DataSet. Only used internally. More...
 
std::shared_ptr< H5::DataSet > _getTableSelf () const override
 Gets the fundamental HDF5 DataSet associated with the table. Only used internally. More...
 
- Protected Member Functions inherited from icedb::Tables::Table
bool valid () const
 Checks that Table is well-formed during runtime. Only used internally. More...
 
 Table (const std::string &name="")
 Default constructor, used by CanHaveTables. More...
 
- Protected Member Functions inherited from icedb::Attributes::CanHaveAttributes
 CanHaveAttributes ()
 
- Protected Member Functions inherited from icedb::Attributes::CanHaveAttributes_impl
virtual void _setAttributeParent (std::shared_ptr< H5::H5Object > obj) override
 
virtual std::shared_ptr< H5::H5Object > _getAttributeParent () const override
 

Private Attributes

std::shared_ptr< H5::DataSet > obj
 

Additional Inherited Members

- Public Types inherited from icedb::Tables::Table
typedef std::vector< size_t > Dimensions_Type
 The dimensions of a Table are expressed as a vector of unsigned integers. More...
 
typedef std::unique_ptr< TableTable_Type
 The preferred method of access of a Table is through std::unique_ptr. More...
 
- Static Public Member Functions inherited from icedb::Attributes::CanHaveAttributes
static bool doesAttributeExist (gsl::not_null< const H5::H5Object *> parent, const std::string &attributeName)
 Does an object (parent) have an attribute with the given name? More...
 
static std::type_index getAttributeTypeId (gsl::not_null< const H5::H5Object *> parent, const std::string &attributeName)
 Returns the type of an attribute. More...
 
template<class DataType >
static void readAttributeData (gsl::not_null< const H5::H5Object *> parent, const std::string &attributeName, std::vector< size_t > &dimensions, std::vector< DataType > &data)
 Function to read the data from an attribute. More...
 
template<class DataType >
static Attribute< DataType > readAttribute (gsl::not_null< const H5::H5Object *> obj, const std::string &attributeName)
 Convenience function to read an attribute's data and return an Attribute object. More...
 
- Public Attributes inherited from icedb::Tables::Table
const std::string name
 The name of the Table. More...
 

Detailed Description

Definition at line 12 of file Table_impl.hpp.

Constructor & Destructor Documentation

◆ ~Table_impl()

icedb::Tables::Table_impl::~Table_impl ( )
virtual

Definition at line 334 of file Tables.cpp.

334 {}

◆ Table_impl()

icedb::Tables::Table_impl::Table_impl ( std::shared_ptr< H5::DataSet >  obj,
const std::string &  name = "" 
)

Definition at line 335 of file Tables.cpp.

References icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent(), and obj.

335  : Table{ name }, obj(obj) {
336  this->_setAttributeParent(obj);
337  }
Table(const std::string &name="")
Default constructor, used by CanHaveTables.
Definition: Tables.cpp:11
const std::string name
The name of the Table.
Definition: Table.hpp:31
virtual void _setAttributeParent(std::shared_ptr< H5::H5Object > obj) override
Definition: Attributes.cpp:24
std::shared_ptr< H5::DataSet > obj
Definition: Table_impl.hpp:13
Here is the call graph for this function:

Member Function Documentation

◆ _getTableSelf()

std::shared_ptr< H5::DataSet > icedb::Tables::Table_impl::_getTableSelf ( ) const
overrideprotectedvirtual

Gets the fundamental HDF5 DataSet associated with the table. Only used internally.

Implements icedb::Tables::Table.

Definition at line 333 of file Tables.cpp.

333 { return obj; }
std::shared_ptr< H5::DataSet > obj
Definition: Table_impl.hpp:13

◆ _setTableSelf()

void icedb::Tables::Table_impl::_setTableSelf ( std::shared_ptr< H5::DataSet >  obj)
overrideprotectedvirtual

Associates the icedb table with the fundamental HDF5 DataSet. Only used internally.

Implements icedb::Tables::Table.

Definition at line 332 of file Tables.cpp.

332 { this->obj = obj; }
std::shared_ptr< H5::DataSet > obj
Definition: Table_impl.hpp:13

Member Data Documentation

◆ obj

std::shared_ptr<H5::DataSet> icedb::Tables::Table_impl::obj
private

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