SheafSystem  0.0.0.0
sheaf::member_record_set Class Reference

A record_set containing records of type member_record. More...

#include <member_record_set.h>

Inheritance diagram for sheaf::member_record_set:
sheaf::record_set sheaf::any

Public Member Functions

virtual member_record_setclone () const
 Virtual constructor; makes a new instance of the same type as this. 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...
 
 member_record_set (const sheaf_file &xfile, int xbuffer_ub, const poset_scaffold &xscaffold, const dof_tuple_record_set &xdof_tuple_records)
 Creates an instance attached to the record_set with name xname in the file xfile, using record packets of size xpacket_ub. More...
 
 member_record_set (const member_record_set &xother)
 Copy constructor. More...
 
virtual ~member_record_set ()
 Destructor. More...
 
virtual const std::string & suffix () const
 The name suffix for this data set. More...
 
void internalize (pod_index_type xmax_row_int_id)
 Internalize the members of scafold().structure() from disk. More...
 
void internalize (const scoped_index &xmax_row_int_id)
 Internalize the members of scafold().structure() from disk. More...
 
void externalize (pod_index_type xmax_row_int_id)
 Externalize the members of scafold().structure() to disk. More...
 
void externalize (const scoped_index &xmax_row_int_id)
 Externalize the members of scafold().structure() to disk. More...
 
dof_tuple_record_setdof_tuple_records ()
 The dof tuple record set associated with this. More...
 
const member_recordrecord () const
 The current member record. 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_filefile () 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_scaffoldscaffold ()
 Scaffold for constructing poset associated with this record set (mutable version). More...
 
const poset_scaffoldscaffold () const
 Scaffold for constructing poset associated with this record set (const version). More...
 
poset_data_type_maptype_map ()
 Data type map for records in this record set (mutable version) More...
 
const poset_data_type_maptype_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...
 

Static Public Member Functions

static pod_index_type first_member_record ()
 The first record used for members; the record following the id space records. More...
 
- 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 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...
 
void read_record (const record_index &xext_id)
 Read and internalizes all the records. More...
 
void read_selection ()
 Read the records specified by the selection into the record buffer. More...
 
void write_selection ()
 Write the records specified by the selection into the file. More...
 
void make_internal_dataspace ()
 Create the internal dataspace. 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...
 
virtual void read_dataset_attributes ()
 Opens and reads the dataset attribute objects from the file. A stub in this class, intended to be redefined in descendants. More...
 
virtual void write_dataset_attributes ()
 Writes the dataset attribute objects into the file. A stub in this class, intended to be redefined in descendants. 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...
 

Additional Inherited Members

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

Detailed Description

A record_set containing records of type member_record.

Definition at line 53 of file member_record_set.h.

Constructor & Destructor Documentation

◆ member_record_set() [1/2]

◆ member_record_set() [2/2]

sheaf::member_record_set::member_record_set ( const member_record_set xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 213 of file member_record_set.cc.

References invariant(), and ~member_record_set().

◆ ~member_record_set()

sheaf::member_record_set::~member_record_set ( )
virtual

Destructor.

Hack:
storage_agent::begin_read_transation() releases access to the poset. When the member_record_set local variable goes out of scope it no longer has access. Read access is only needed because writing a poset forces delete_member_id_space to only require read access when it should require read-write access.

Definition at line 238 of file member_record_set.cc.

References sheaf::record_set::_ext_dataspace_dims, sheaf::index_space_family::delete_space(), sheaf::poset_state_handle::get_read_access(), sheaf::poset_state_handle::member_id_spaces(), sheaf::poset_state_handle::release_access(), sheaf::poset_scaffold::structure(), and suffix().

Referenced by member_record_set().

Member Function Documentation

◆ clone()

sheaf::member_record_set * sheaf::member_record_set::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::record_set.

Definition at line 59 of file member_record_set.cc.

References invariant().

◆ create_dataset()

hid_t sheaf::member_record_set::create_dataset ( )
protectedvirtual

Creates the HDF dataset associated with this.

Precondition
  • file().mode() == sheaf_file::READ_WRITE
Issue:
extendible dataspaces are probably not needed for all posets
Postcondition
  • result >= 0

Implements sheaf::record_set.

Definition at line 698 of file member_record_set.cc.

References sheaf::record_set::_ext_dataspace_hdf_id, sheaf::record_set::_int_data_type_hdf_id, sheaf::record_set::_record_buffer_ub, create_int_data_type(), sheaf::record_set::file(), sheaf::record_set::hdf_id(), and sheaf::record_set::name().

Referenced by first_member_record().

◆ create_int_data_type()

void sheaf::member_record_set::create_int_data_type ( )
protectedvirtual

◆ dof_tuple_records()

sheaf::dof_tuple_record_set & sheaf::member_record_set::dof_tuple_records ( )

The dof tuple record set associated with this.

Definition at line 670 of file member_record_set.cc.

References record().

Referenced by externalize(), sheaf::member_record::externalize(), and sheaf::member_record::internalize().

◆ externalize() [1/2]

void sheaf::member_record_set::externalize ( pod_index_type  xmax_row_int_id)

◆ externalize() [2/2]

void sheaf::member_record_set::externalize ( const scoped_index xmax_row_int_id)

Externalize the members of scafold().structure() to disk.

Precondition
  • scaffold().structure().state_is_read_accessible()
  • !record().has_equivalence_iterator()
Postcondition
  • !record().has_equivalence_iterator()

Definition at line 646 of file member_record_set.cc.

References dof_tuple_records(), externalize(), sheaf::scoped_index::hub_pod(), sheaf::record_set::is_open(), record(), and sheaf::record_set::scaffold().

◆ first_member_record()

sheaf::pod_index_type sheaf::member_record_set::first_member_record ( )
static

The first record used for members; the record following the id space records.

Definition at line 685 of file member_record_set.cc.

References create_dataset().

Referenced by make_internal_dataspace(), and record().

◆ internalize() [1/2]

◆ internalize() [2/2]

void sheaf::member_record_set::internalize ( const scoped_index xmax_row_int_id)

Internalize the members of scafold().structure() from disk.

Precondition
  • scaffold().structure().state_is_read_write_accessible()
Postcondition

Definition at line 504 of file member_record_set.cc.

References externalize(), sheaf::scoped_index::hub_pod(), internalize(), sheaf::record_set::is_open(), and sheaf::record_set::scaffold().

◆ invariant()

bool sheaf::member_record_set::invariant ( ) const
virtual

Class invariant.

Invariant
  • is_open() ? _ext_dataspace_rank == DATASPACE_RANK : true

Reimplemented from sheaf::record_set.

Definition at line 83 of file member_record_set.cc.

References is_ancestor_of().

Referenced by clone(), and member_record_set().

◆ is_ancestor_of()

bool sheaf::member_record_set::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::record_set.

Definition at line 118 of file member_record_set.cc.

References member_record_set().

Referenced by invariant().

◆ make_internal_dataspace()

void sheaf::member_record_set::make_internal_dataspace ( )
protected

Create the internal dataspace.

Precondition
Postcondition
  • _int_dataspace_hdf_id >= 0

Definition at line 976 of file member_record_set.cc.

References sheaf::record_set::_int_data_type_hdf_id, sheaf::record_set::_int_dataspace_hdf_id, sheaf::record_set::_record_buffer_ct, sheaf::crg_interval::begin(), sheaf::poset_crg_state::clean_cover(), sheaf::gathered_insertion_index_space_handle::clear(), sheaf::poset_state_handle::crg(), sheaf::DOWN, sheaf::crg_interval::end(), sheaf::poset_crg_state::explicit_down_set_members(), sheaf::member_record::external_size(), sheaf::interval_index_space_record::externalize(), first_member_record(), sheaf::poset_component::host(), sheaf::abstract_poset_member::hub_id(), sheaf::poset_crg_state::implicit_member(), sheaf::record_set::inc_record_buffer_ct(), sheaf::index_iterator::index(), sheaf::depth_first_itr< T >::index(), sheaf::scattered_insertion_index_space_handle::insert(), sheaf::interval_index_space_handle::insert_interval(), sheaf::subposet::insert_member(), sheaf::interval_index_space_record::internalize(), sheaf::member_record::interval(), sheaf::implicit_crg_interval::interval_member(), sheaf::index_iterator::is_done(), sheaf::depth_first_itr< T >::is_done(), sheaf::record_set::is_open(), sheaf::member_record::is_resident(), sheaf::poset_state_handle::member_iterator(), sheaf::record_set::name(), sheaf::poset_state_handle::name(), sheaf::index_iterator::next(), sheaf::depth_first_itr< T >::next(), sheaf::NOT_STRICT, sheaf::scoped_index::pod(), sheaf::interval_index_space_handle::print_map_rep(), read_record(), read_selection(), record(), sheaf::record_set::record_buffer_ct(), sheaf::record_set::record_buffer_is_empty(), sheaf::record_set::record_buffer_ub(), sheaf::record_set::reset_record_buffer_ct(), sheaf::poset_scaffold::resident(), sheaf::record_set::scaffold(), sheaf::poset_scaffold::structure(), sheaf::depth_first_itr< T >::truncate(), sheaf::UPPER, sheaf::WHOLE_INDEX, and write_selection().

Referenced by read_selection(), and write_selection().

◆ read_record()

void sheaf::member_record_set::read_record ( const record_index xext_id)
protected

◆ read_selection()

void sheaf::member_record_set::read_selection ( )
protected

◆ record()

const sheaf::member_record & sheaf::member_record_set::record ( ) const

The current member record.

Definition at line 677 of file member_record_set.cc.

References first_member_record().

Referenced by dof_tuple_records(), externalize(), and make_internal_dataspace().

◆ suffix()

const std::string & sheaf::member_record_set::suffix ( ) const
virtual

The name suffix for this data set.

Reimplemented from sheaf::record_set.

Definition at line 268 of file member_record_set.cc.

References internalize().

Referenced by ~member_record_set().

◆ write_selection()


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