icedb
version 0.5.1
Snow particle scattering database API
|
This class defines an attribute. More...
#include <Attribute.hpp>
Public Types | |
typedef DataType | type |
Public Member Functions | |
bool | isArray () const |
Does this attribute span more than one dimension? More... | |
Attribute (const std::string &name) | |
Create an empty attribute. More... | |
Attribute (const std::string &name, DataType val) | |
Create a zero-dimensional attribute with pre-populated data. More... | |
Attribute (const std::string &name, std::initializer_list< size_t > dims, std::initializer_list< DataType > data) | |
Create a multi-dimensional attribute with pre-populated data. More... | |
Public Attributes | |
std::vector< DataType > | data |
std::string | name |
The name of the attribute. More... | |
std::vector< size_t > | dimensionality |
The attribute's dimensional span. NetCDF only accepts one-dimensional attributes. More... | |
Protected Member Functions | |
Attribute () | |
This class defines an attribute.
Attributes provide "additional information" to a table or a group. They have a type and a size, and are read and written as complete objects.
Attributes must be explicitly written to an object inheriting from CanHaveAttributes.
Definition at line 23 of file Attribute.hpp.
typedef DataType icedb::Attributes::Attribute< DataType >::type |
Definition at line 27 of file Attribute.hpp.
|
inlineprotected |
Definition at line 25 of file Attribute.hpp.
|
inline |
Create an empty attribute.
Definition at line 42 of file Attribute.hpp.
|
inline |
Create a zero-dimensional attribute with pre-populated data.
Definition at line 44 of file Attribute.hpp.
|
inline |
Create a multi-dimensional attribute with pre-populated data.
Definition at line 47 of file Attribute.hpp.
|
inline |
Does this attribute span more than one dimension?
Definition at line 36 of file Attribute.hpp.
std::vector<DataType> icedb::Attributes::Attribute< DataType >::data |
The data contained in the attribute. The size of this data must match the number of elements defined by the attribute's dimensionality.
Definition at line 30 of file Attribute.hpp.
Referenced by icedb::Attributes::CanHaveAttributes::isAttributeOfType(), icedb::Shapes::Shape::isShape(), main(), icedb::Attributes::CanHaveAttributes::readAttribute(), and icedb::Attributes::CanHaveAttributes::writeAttribute().
std::vector<size_t> icedb::Attributes::Attribute< DataType >::dimensionality |
The attribute's dimensional span. NetCDF only accepts one-dimensional attributes.
Definition at line 34 of file Attribute.hpp.
Referenced by icedb::Attributes::CanHaveAttributes::readAttribute(), and icedb::Attributes::CanHaveAttributes::writeAttribute().
std::string icedb::Attributes::Attribute< DataType >::name |
The name of the attribute.
Definition at line 32 of file Attribute.hpp.
Referenced by icedb::Attributes::CanHaveAttributes::writeAttribute().