icedb
version 0.5.1
Snow particle scattering database API
|
Contains everything concerning attributes. More...
Classes | |
class | Attribute |
This class defines an attribute. More... | |
class | CanHaveAttributes |
This is a virtual base class for objects that can have attributes. This includes tables, groups and HDF5 files. More... | |
class | CanHaveAttributes_impl |
class | Checked_Existing_Attribute |
An encapsulating class that ensures that an attribute exists before it is accessed. More... | |
Functions | |
template<class DataType > | |
constexpr bool | isString () |
Used to flag string types for special treatment. More... | |
template<> | |
constexpr bool | isString< std::string > () |
template<class DataType > | |
void | pullData (const std::string &attributeName, std::vector< size_t > &dims, std::vector< DataType > &tdata, gsl::not_null< const H5::H5Object *> obj) |
Template function to pull data from the HDF5 object. More... | |
INST_ATTR (INST_READ_ATTR_TYPE) | |
template<class DataType , class ObjectType > | |
void | pushData (const std::string &attributeName, const std::vector< size_t > &dimensionality, std::shared_ptr< ObjectType > obj, const std::vector< DataType > &data, bool forceArray=false) |
INST_ATTR (INST_WRITE_ATTR_TYPE) | |
Contains everything concerning attributes.
icedb::Attributes::INST_ATTR | ( | INST_READ_ATTR_TYPE | ) |
icedb::Attributes::INST_ATTR | ( | INST_WRITE_ATTR_TYPE | ) |
constexpr bool icedb::Attributes::isString | ( | ) |
Used to flag string types for special treatment.
Definition at line 109 of file Attributes.cpp.
constexpr bool icedb::Attributes::isString< std::string > | ( | ) |
Definition at line 110 of file Attributes.cpp.
void icedb::Attributes::pullData | ( | const std::string & | attributeName, |
std::vector< size_t > & | dims, | ||
std::vector< DataType > & | tdata, | ||
gsl::not_null< const H5::H5Object *> | obj | ||
) |
Template function to pull data from the HDF5 object.
Use HDF5 function to query the dataspace, to first see if it is an array, a vector (not a std::vector), or a scalar value. Get and set dimensions, then resize the input data array. Then, read data and copy into the appropriate Variant buffer (data).
Definition at line 119 of file Attributes.cpp.
References icedb::fs::hdf5::ARRAY, icedb::fs::hdf5::BASIC, icedb::fs::hdf5::getAttributeGroupingType(), icedb::fs::hdf5::readAttr(), icedb::fs::hdf5::readAttrArray(), icedb::fs::hdf5::readAttrVector(), icedb::fs::hdf5::STRING, and icedb::fs::hdf5::VLEN.
void icedb::Attributes::pushData | ( | const std::string & | attributeName, |
const std::vector< size_t > & | dimensionality, | ||
std::shared_ptr< ObjectType > | obj, | ||
const std::vector< DataType > & | data, | ||
bool | forceArray = false |
||
) |
Definition at line 193 of file Attributes.cpp.