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

#include <Attribute_impl.hpp>

Inheritance diagram for icedb::Attributes::CanHaveAttributes_impl:
Inheritance graph
[legend]
Collaboration diagram for icedb::Attributes::CanHaveAttributes_impl:
Collaboration graph
[legend]

Public Member Functions

 CanHaveAttributes_impl (std::shared_ptr< H5::H5Object >)
 
 CanHaveAttributes_impl ()
 
virtual ~CanHaveAttributes_impl ()
 
- 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...
 

Protected Member Functions

virtual void _setAttributeParent (std::shared_ptr< H5::H5Object > obj) override
 
virtual std::shared_ptr< H5::H5Object > _getAttributeParent () const override
 
- Protected Member Functions inherited from icedb::Attributes::CanHaveAttributes
 CanHaveAttributes ()
 

Private Attributes

std::shared_ptr< H5::H5Object > parent
 

Additional Inherited Members

- 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...
 

Detailed Description

Definition at line 6 of file Attribute_impl.hpp.

Constructor & Destructor Documentation

◆ CanHaveAttributes_impl() [1/2]

icedb::Attributes::CanHaveAttributes_impl::CanHaveAttributes_impl ( std::shared_ptr< H5::H5Object >  parent)

Definition at line 16 of file Attributes.cpp.

16 : parent(parent) {}
std::shared_ptr< H5::H5Object > parent

◆ CanHaveAttributes_impl() [2/2]

icedb::Attributes::CanHaveAttributes_impl::CanHaveAttributes_impl ( )

Definition at line 15 of file Attributes.cpp.

15 {}

◆ ~CanHaveAttributes_impl()

icedb::Attributes::CanHaveAttributes_impl::~CanHaveAttributes_impl ( )
virtual

Definition at line 17 of file Attributes.cpp.

17 {}

Member Function Documentation

◆ _getAttributeParent()

std::shared_ptr< H5::H5Object > icedb::Attributes::CanHaveAttributes_impl::_getAttributeParent ( ) const
overrideprotectedvirtual

◆ _setAttributeParent()

void icedb::Attributes::CanHaveAttributes_impl::_setAttributeParent ( std::shared_ptr< H5::H5Object >  obj)
overrideprotectedvirtual

Implements icedb::Attributes::CanHaveAttributes.

Definition at line 24 of file Attributes.cpp.

References parent.

Referenced by icedb::Groups::Group_impl::Group_impl(), and icedb::Tables::Table_impl::Table_impl().

25  {
26  parent = obj;
27  }
std::shared_ptr< H5::H5Object > parent
Here is the caller graph for this function:

Member Data Documentation

◆ parent

std::shared_ptr<H5::H5Object> icedb::Attributes::CanHaveAttributes_impl::parent
private

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