icedb
version 0.5.1
Snow particle scattering database API
|
#include <Group_impl.hpp>
Public Member Functions | |
Group_impl () | |
Group_impl (const std::string &name, gsl::not_null< H5::Group *> parent) | |
Group_impl (const std::string &name, gsl::not_null< H5::H5File *> parent) | |
Group_impl (const std::string &name, gsl::not_null< const Group *> parent) | |
Group_impl (Group_HDF_shared_ptr grp) | |
virtual | ~Group_impl () |
Group_ptr | createGroup (const std::string &groupName) override |
Create a group. More... | |
Group_ptr | openGroup (const std::string &groupName) const override |
Opens a group. More... | |
bool | doesGroupExist (const std::string &groupName) const override |
Does a group with this name exist? More... | |
std::set< std::string > | getGroupNames () const override |
void | deleteGroup (const std::string &groupName) override |
Unlink the specified child group. More... | |
Group_HDF_shared_ptr | getHDF5Group () const override |
Get the fundamental HDF5 object that the group is built on. More... | |
![]() | |
virtual | ~Group () |
![]() | |
~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... | |
![]() | |
~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... | |
![]() | |
CanHaveAttributes_impl (std::shared_ptr< H5::H5Object >) | |
CanHaveAttributes_impl () | |
virtual | ~CanHaveAttributes_impl () |
![]() | |
virtual | ~CanHaveTables_impl () |
CanHaveTables_impl () | |
Private Attributes | |
Group_HDF_shared_ptr | grp |
Friends | |
class | Group |
Additional Inherited Members | |
![]() | |
typedef std::unique_ptr< Groups::Group > | Group_ptr |
typedef std::shared_ptr< H5::Group > | Group_HDF_shared_ptr |
![]() | |
static Group_ptr | createGroup (const std::string &name, gsl::not_null< H5::Group *> parent) |
Create a group with a specified parent (static function) More... | |
static Group_ptr | createGroup (const std::string &name, gsl::not_null< H5::H5File *> parent) |
Create a group with a specified parent (static function) More... | |
static Group_ptr | createGroup (const std::string &name, gsl::not_null< const Group *> parent) |
Create a group with a specified parent (static function) More... | |
static Group_ptr | openGroup (const std::string &name, gsl::not_null< H5::Group *> parent) |
Open a group under the specified parent (static function) More... | |
static Group_ptr | openGroup (const std::string &name, gsl::not_null< H5::H5File *> parent) |
Open a group under the specified parent (static function) More... | |
static Group_ptr | openGroup (const std::string &name, gsl::not_null< const Group *> parent) |
Open a group under the specified parent (static function) More... | |
static Group_ptr | openGroup (Group_HDF_shared_ptr group) |
Open an icedb group from an HDF5 group object. More... | |
static Group_ptr | mount (const std::string &subdirname, gsl::not_null< const Group *> containingParent, gsl::not_null< H5::H5File *> pointsTo) |
Mount an HDF5 file as a child 'group'. More... | |
![]() | |
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... | |
![]() | |
const std::string | name |
The name of the group. More... | |
![]() | |
static const std::string | _icedb_obj_type_identifier = { "_icedb_obj_type" } |
The tag used in icedb to identify a group. More... | |
![]() | |
Group () | |
Group (const std::string &name) | |
![]() | |
CanHaveAttributes () | |
![]() | |
CanHaveTables () | |
Trivial constructor used when CanHaveTables is a virtual base class. More... | |
![]() | |
virtual void | _setAttributeParent (std::shared_ptr< H5::H5Object > obj) override |
virtual std::shared_ptr< H5::H5Object > | _getAttributeParent () const override |
![]() | |
void | _setTablesParent (std::shared_ptr< H5::Group > obj) override |
CanHaveTables needs post-constructor setup. This sets the base HDF5 object that gets manipulated. More... | |
std::shared_ptr< H5::Group > | _getTablesParent () const override |
Gets the base HDF5 object that is manipulated. More... | |
Definition at line 14 of file Group_impl.hpp.
icedb::Groups::Group_impl::Group_impl | ( | ) |
Definition at line 11 of file Groups.cpp.
References icedb::Groups::Group::_icedb_obj_type_identifier.
icedb::Groups::Group_impl::Group_impl | ( | const std::string & | name, |
gsl::not_null< H5::Group *> | parent | ||
) |
Definition at line 19 of file Groups.cpp.
References icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent(), icedb::Tables::CanHaveTables_impl::_setTablesParent(), grp, icedb::Groups::Group::name, icedb::fs::hdf5::openGroup(), and icedb::Attributes::CanHaveAttributes_impl::parent.
icedb::Groups::Group_impl::Group_impl | ( | const std::string & | name, |
gsl::not_null< H5::H5File *> | parent | ||
) |
Definition at line 28 of file Groups.cpp.
References icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent(), icedb::Tables::CanHaveTables_impl::_setTablesParent(), grp, icedb::Groups::Group::name, icedb::fs::hdf5::openGroup(), and icedb::Attributes::CanHaveAttributes_impl::parent.
icedb::Groups::Group_impl::Group_impl | ( | const std::string & | name, |
gsl::not_null< const Group *> | parent | ||
) |
Definition at line 39 of file Groups.cpp.
References icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent(), icedb::Tables::CanHaveTables_impl::_setTablesParent(), grp, icedb::Groups::Group::name, icedb::fs::hdf5::openGroup(), and icedb::Attributes::CanHaveAttributes_impl::parent.
icedb::Groups::Group_impl::Group_impl | ( | Group_HDF_shared_ptr | grp | ) |
Definition at line 49 of file Groups.cpp.
References icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent(), icedb::Tables::CanHaveTables_impl::_setTablesParent(), and grp.
|
virtual |
Definition at line 17 of file Groups.cpp.
|
overridevirtual |
Create a group.
groupName | is the new group's name |
if | read-only |
if | a group with htis name already exists |
Implements icedb::Groups::Group.
Definition at line 61 of file Groups.cpp.
References icedb::Groups::Group::createGroup(), and grp.
|
overridevirtual |
Unlink the specified child group.
groupName | is the name of the group to be unlinked |
if | groupName is invalid |
if | a group with name groupName does not exist |
Implements icedb::Groups::Group.
Definition at line 138 of file Groups.cpp.
References grp.
|
overridevirtual |
Does a group with this name exist?
groupName | is the name of the group |
if | groupName is somehow invalid |
Implements icedb::Groups::Group.
Definition at line 142 of file Groups.cpp.
References getGroupNames().
|
overridevirtual |
Implements icedb::Groups::Group.
Definition at line 148 of file Groups.cpp.
References icedb::fs::hdf5::getGroupMembersTypes(), and grp.
Referenced by doesGroupExist().
|
overridevirtual |
Get the fundamental HDF5 object that the group is built on.
Implements icedb::Groups::Group.
Definition at line 57 of file Groups.cpp.
References grp.
|
overridevirtual |
Opens a group.
groupName | is the name of the group to be opened |
if | the group does not exist |
Implements icedb::Groups::Group.
Definition at line 107 of file Groups.cpp.
References grp, icedb::Groups::Group::name, icedb::Groups::Group::openGroup(), and icedb::Attributes::CanHaveAttributes_impl::parent.
Referenced by icedb::Groups::Group::mount().
|
friend |
Definition at line 19 of file Group_impl.hpp.
|
private |
Definition at line 17 of file Group_impl.hpp.
Referenced by createGroup(), deleteGroup(), getGroupNames(), getHDF5Group(), Group_impl(), openGroup(), and icedb::Shapes::Shape_impl::Shape_impl().