SheafSystem
0.0.0.0
|
A record set for storing various poset attributes. More...
#include <attributes_record_set.h>
Public Member Functions | |
attributes_record_set (const attributes_record_set &xother) | |
Copy constructor. More... | |
virtual attributes_record_set * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual | ~attributes_record_set () |
Destructor. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
attributes_record_set (const sheaf_file &xfile, const poset_scaffold &xscaffold) | |
Creates an instance attached to the record_set with name xname in the file xfile, with a record buffer containing xbuffer_ub records. More... | |
virtual const std::string & | suffix () const |
The name suffix for this data set. More... | |
void | internalize () |
Internalize the record set from disk. More... | |
void | externalize () |
Externalize the reccord set to disk. More... | |
Public Member Functions inherited from sheaf::record_set | |
record_set (const sheaf_file &xfile, int xrecord_buffer_ub, const poset_scaffold &xscaffold) | |
Creates an instance attached to the record_set with name xname in the file xfile, using record packets of size xpacket_ub. More... | |
record_set (const record_set &xother) | |
Copy constructor. More... | |
virtual | ~record_set () |
Destructor. More... | |
const sheaf_file & | file () const |
The file this record_set belongs to. More... | |
std::string | name () const |
The name of this data set. More... | |
std::string | alias () const |
The standard alias for this data set. More... | |
std::string | data_set_name (const std::string &xname) const |
The data set name for a poset with name xname. More... | |
std::string | data_set_alias (const std::string &xname) const |
The data set alias for a poset with name xname. More... | |
std::string | poset_name () const |
The name of the poset this represents, extracted from the name of the dataset. More... | |
poset_scaffold & | scaffold () |
Scaffold for constructing poset associated with this record set (mutable version). More... | |
const poset_scaffold & | scaffold () const |
Scaffold for constructing poset associated with this record set (const version). More... | |
poset_data_type_map & | type_map () |
Data type map for records in this record set (mutable version) More... | |
const poset_data_type_map & | type_map () const |
Data type map for records in this record set (const version) More... | |
virtual void | open () |
Opens the record_set. More... | |
bool | is_open () const |
True if this record_set is open. More... | |
virtual void | close () |
Closes the record_set. More... | |
int | record_buffer_ct () const |
The number of active records in record buffer. More... | |
void | inc_record_buffer_ct () |
The increment the number of active records in record buffer. More... | |
void | reset_record_buffer_ct () |
The set the number of active records in record buffer to 0. More... | |
int | record_buffer_ub () const |
The maximum number of records the buffer can hold. More... | |
bool | record_buffer_is_empty () const |
True if there are no active records in the buffer. More... | |
bool | record_buffer_is_full () const |
True if there are no inactive records in the buffer. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Protected Member Functions | |
virtual hid_t | create_dataset () |
Creates the HDF dataset associated with this. More... | |
virtual void | create_int_data_type () |
Creates a new HDF internal data type. More... | |
virtual void | read_dataset_attributes () |
Reads the dataset attribute objects from the file. More... | |
virtual void | write_dataset_attributes () |
Writes the dataset attribute objects into the file. More... | |
virtual void | read_toc_bounds_attribute () |
Reads the table of contents lower bound attribute into the file. More... | |
virtual void | write_toc_bounds_attribute () |
Writes the table of contents lower bound attribute into the file. More... | |
Protected Member Functions inherited from sheaf::record_set | |
void | extend_dataset (const hsize_t *xdims, int xdims_ub) |
Extends the dataset dimensions to at least the dimensions given xdims, an array of length xdims_ub. More... | |
void | create_alias () |
Creates a soft link from alias to the data set. More... | |
void | set_name_from_alias () |
Sets the primary name of the dataset from the alias. More... | |
hid_t | hdf_id () |
The HDF id for this record set. More... | |
hid_t | ext_dataspace_hdf_id () |
The HDF id for the external dataspace of this record set. More... | |
hid_t | ext_data_type_hdf_id () |
The HDF external data type id for this record set. More... | |
int | ext_dataspace_rank () |
The rank of the dataspace for the record_set. More... | |
hsize_t | ext_dataspace_dim (int xi) |
The dimension of xi-th index of the external dataspace. More... | |
hid_t | int_dataspace_hdf_id () |
The hdf5 id of the internal dataspace associated with the record buffer. More... | |
hid_t | int_data_type_hdf_id () |
The HDF internal data type id for this record set. More... | |
void | read_attribute (const char *&xatt_values, size_type &xatt_ct, const data_converter *xatt_conv, const std::string &xatt_name) |
Reads the attribute with name xatt_name from the file. More... | |
void | write_attribute (const void *xatt_values, size_type xatt_ct, const data_converter *xatt_conv, const std::string &xatt_name) |
Writes the attribute with name xatt_name into the file. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Static Protected Member Functions | |
static const char * | TOC_BOUNDS_ATTRIBUTE_NAME () |
The name of the table of contents lower bound attribute. More... | |
Static Protected Attributes | |
static const hsize_t | TOC_BOUNDS_EXTENT = 3 |
The extent of the table of contents lower bound attribute dataspace. More... | |
Static Protected Attributes inherited from sheaf::record_set | |
static const hid_t | NOT_AN_HDF_ID = -1 |
Value indicating an invalid HDf object id. /. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from sheaf::record_set | |
static const std::string & | name_space_alias () |
The reserved, standard alias for the namespace in the file. More... | |
static const std::string & | name_space_prefix () |
The reserved, standard prefix for namespace dataser names. More... | |
Protected Attributes inherited from sheaf::record_set | |
sheaf_file & | _file |
The file this record_set belongs to. More... | |
std::string | _name |
The name of this record_set. More... | |
std::string | _alias |
The standard alias for this record_set. More... | |
poset_scaffold & | _scaffold |
The poset scaffold associated with this. More... | |
hid_t | _hdf_id |
The HDF id for this record set. More... | |
hid_t | _ext_dataspace_hdf_id |
The HDF id for the external dataspace of this record set. More... | |
hid_t | _ext_data_type_hdf_id |
The HDF external data type id for this record set. More... | |
int | _ext_dataspace_rank |
The rank of the dataspace for the record_set. More... | |
hsize_t * | _ext_dataspace_dims |
The current dimensions of the external dataspace. More... | |
int | _record_buffer_ct |
The number of active records in record buffer. More... | |
int | _record_buffer_ub |
The maximum number of records the buffer can hold. More... | |
hid_t | _int_dataspace_hdf_id |
The hdf5 id of the dataspace associated with the record buffer. More... | |
hid_t | _int_data_type_hdf_id |
The HDF internal data type id for this record set. More... | |
A record set for storing various poset attributes.
Definition at line 85 of file attributes_record_set.h.
sheaf::attributes_record_set::attributes_record_set | ( | const attributes_record_set & | xother | ) |
Copy constructor.
Not Implemented.
Definition at line 56 of file attributes_record_set.cc.
References clone(), and invariant().
Referenced by clone(), and is_ancestor_of().
|
virtual |
Destructor.
Definition at line 112 of file attributes_record_set.cc.
References sheaf::record_set::_ext_dataspace_dims, and invariant().
Referenced by clone().
sheaf::attributes_record_set::attributes_record_set | ( | const sheaf_file & | xfile, |
const poset_scaffold & | xscaffold | ||
) |
Creates an instance attached to the record_set with name xname in the file xfile, with a record buffer containing xbuffer_ub records.
Definition at line 193 of file attributes_record_set.cc.
References sheaf::record_set::_alias, sheaf::record_set::_ext_dataspace_dims, sheaf::record_set::_ext_dataspace_rank, sheaf::record_set::_int_dataspace_hdf_id, sheaf::record_set::_name, sheaf::record_set::_record_buffer_ct, sheaf::record_set::_record_buffer_ub, sheaf::record_set::alias(), sheaf::record_set::data_set_alias(), sheaf::record_set::data_set_name(), invariant(), sheaf::sheaf_file::is_open(), sheaf::record_set::is_open(), sheaf::record_set::name(), sheaf::poset_state_handle::name(), sheaf::record_set::record_buffer_ct(), sheaf::record_set::record_buffer_ub(), sheaf::record_set::scaffold(), sheaf::poset_scaffold::structure(), and suffix().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Reimplemented from sheaf::record_set.
Definition at line 89 of file attributes_record_set.cc.
References attributes_record_set(), sheaf::any::is_same_type(), and ~attributes_record_set().
Referenced by attributes_record_set().
|
protectedvirtual |
Creates the HDF dataset associated with this.
Implements sheaf::record_set.
Definition at line 506 of file attributes_record_set.cc.
References sheaf::record_set::_ext_dataspace_hdf_id, sheaf::record_set::_int_data_type_hdf_id, create_int_data_type(), sheaf::record_set::file(), sheaf::record_set::hdf_id(), sheaf::record_set::name(), and sheaf::record_set::record_buffer_ub().
Referenced by externalize().
|
protectedvirtual |
Creates a new HDF internal data type.
Implements sheaf::record_set.
Definition at line 549 of file attributes_record_set.cc.
References sheaf::record_set::_ext_data_type_hdf_id, sheaf::record_set::_ext_dataspace_hdf_id, sheaf::record_set::_hdf_id, sheaf::record_set::_int_data_type_hdf_id, sheaf::record_set::_int_dataspace_hdf_id, sheaf::record_set::_record_buffer_ct, sheaf::record_set::_record_buffer_ub, sheaf::record_set::file(), sheaf::record_set::int_data_type_hdf_id(), sheaf::record_set::is_open(), read_dataset_attributes(), sheaf::record_set::record_buffer_ct(), sheaf::record_set::record_buffer_ub(), and sheaf::record_set::type_map().
Referenced by create_dataset().
void sheaf::attributes_record_set::externalize | ( | ) |
Externalize the reccord set to disk.
Definition at line 400 of file attributes_record_set.cc.
References sheaf::record_set::_record_buffer_ub, create_dataset(), sheaf::attributes_record::externalize(), and sheaf::record_set::scaffold().
Referenced by sheaf::storage_agent::commit_transaction(), and internalize().
void sheaf::attributes_record_set::internalize | ( | ) |
Internalize the record set from disk.
Definition at line 280 of file attributes_record_set.cc.
References sheaf::record_set::_int_data_type_hdf_id, sheaf::record_set::_int_dataspace_hdf_id, sheaf::record_set::_record_buffer_ub, externalize(), sheaf::attributes_record::internalize(), and sheaf::record_set::scaffold().
Referenced by sheaf::storage_agent::begin_read_transaction(), and suffix().
|
virtual |
Class invariant.
Reimplemented from sheaf::record_set.
Definition at line 133 of file attributes_record_set.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::record_set::invariant(), sheaf::any::invariant_check(), is_ancestor_of(), and sheaf::record_set::record_buffer_ub().
Referenced by attributes_record_set(), and ~attributes_record_set().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::record_set.
Definition at line 168 of file attributes_record_set.cc.
References attributes_record_set().
Referenced by invariant().
|
protectedvirtual |
Reads the dataset attribute objects from the file.
Reimplemented from sheaf::record_set.
Definition at line 656 of file attributes_record_set.cc.
References sheaf::record_set::is_open(), read_toc_bounds_attribute(), and write_dataset_attributes().
Referenced by create_int_data_type().
|
protectedvirtual |
Reads the table of contents lower bound attribute into the file.
Definition at line 710 of file attributes_record_set.cc.
References sheaf::record_set::_hdf_id, sheaf::record_set::is_open(), sheaf::poset_state_handle::name(), sheaf::record_set::scaffold(), sheaf::poset_scaffold::structure(), TOC_BOUNDS_ATTRIBUTE_NAME(), TOC_BOUNDS_EXTENT, sheaf::record_set::type_map(), sheaf::poset_scaffold::update_toc_bounds(), and write_toc_bounds_attribute().
Referenced by read_dataset_attributes(), and TOC_BOUNDS_ATTRIBUTE_NAME().
|
virtual |
The name suffix for this data set.
Reimplemented from sheaf::record_set.
Definition at line 256 of file attributes_record_set.cc.
References internalize().
Referenced by attributes_record_set().
|
staticprotected |
The name of the table of contents lower bound attribute.
Definition at line 699 of file attributes_record_set.cc.
References read_toc_bounds_attribute(), and TOC_BOUNDS_EXTENT.
Referenced by read_toc_bounds_attribute(), write_dataset_attributes(), and write_toc_bounds_attribute().
|
protectedvirtual |
Writes the dataset attribute objects into the file.
Reimplemented from sheaf::record_set.
Definition at line 678 of file attributes_record_set.cc.
References sheaf::record_set::is_open(), TOC_BOUNDS_ATTRIBUTE_NAME(), and write_toc_bounds_attribute().
Referenced by read_dataset_attributes().
|
protectedvirtual |
Writes the table of contents lower bound attribute into the file.
Definition at line 816 of file attributes_record_set.cc.
References sheaf::record_set::_hdf_id, sheaf::record_set::is_open(), sheaf::is_valid(), sheaf::poset_bounds::lb_id(), sheaf::poset_scaffold::member_id_space(), sheaf::poset_state_handle::name(), sheaf::explicit_index_space_handle::pod(), sheaf::poset_scaffold::row_bounds(), sheaf::record_set::scaffold(), sheaf::poset_scaffold::structure(), sheaf::poset_scaffold::subposet_id_space(), TOC_BOUNDS_ATTRIBUTE_NAME(), TOC_BOUNDS_EXTENT, and sheaf::record_set::type_map().
Referenced by read_toc_bounds_attribute(), and write_dataset_attributes().
|
staticprotected |
The extent of the table of contents lower bound attribute dataspace.
Definition at line 179 of file attributes_record_set.h.
Referenced by read_toc_bounds_attribute(), TOC_BOUNDS_ATTRIBUTE_NAME(), and write_toc_bounds_attribute().