SheafSystem
0.0.0.0
|
An abstract wrapper/adapter for attributes records. Intended for transferring data between the kernel and the i/o subsystem. More...
#include <attributes_record.h>
Public Types | |
typedef char * | hdf_buf_type |
The type of hdf buffer. More... | |
Public Member Functions | |
attributes_record (const attributes_record &xother) | |
Copy constructor. More... | |
virtual attributes_record * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual | ~attributes_record () |
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 (poset_scaffold &xscaffold) | |
Creates an instance with type map xtype_map. More... | |
void | internalize (hdf_buf_type *xhdf_buffer) |
Converts the record from external to internal form. More... | |
void | externalize (hdf_buf_type *xhdf_buffer) |
Converts the record from internal to external form. More... | |
Public Member Functions inherited from sheaf::variable_length_record | |
variable_length_record (const variable_length_record &xother) | |
Copy constructor. More... | |
virtual | ~variable_length_record () |
Destructor. More... | |
variable_length_record (const poset_scaffold &xscaffold) | |
Creates an instance with type map xtype_map. More... | |
void * | buf () const |
The buffer. More... | |
size_t | buf_ub () const |
The size of the buffer, in bytes. More... | |
Public Member Functions inherited from sheaf::record | |
record (const record &xother) | |
Copy constructor. More... | |
virtual | ~record () |
Destructor. More... | |
record (const poset_scaffold &xscaffold) | |
Creates an instance with type map xtype_map. More... | |
record_index | external_index () const |
The external index of this record. More... | |
void | put_external_index (const record_index &xindex) |
Sets the index of this record to xindex. More... | |
poset_scaffold & | scaffold () |
The scaffold for the poset associated with this record (mutable version). More... | |
const poset_scaffold & | scaffold () const |
The scaffold for the poset associated with this record (const version). More... | |
poset_data_type_map & | type_map () |
The data type map used to convert data for this record (mutable version). More... | |
const poset_data_type_map & | type_map () const |
The data type map used to convert data for this record (const version). 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 | |
void | transfer_HDF_to_external_buffer (hdf_buf_type *xbuf) |
Initializes the external buffer from xbuf. More... | |
void | transfer_external_buffer_to_HDF (hdf_buf_type *xbuf) |
Initializes the HDF buffer xbuf from the external buffer. More... | |
virtual void | transfer_internal_buffer_to_poset ()=0 |
Initializes scaffold from the internal buffer. More... | |
virtual void | transfer_poset_to_internal_buffer ()=0 |
Initializes the internal buffer from the scaffold. More... | |
void | convert_external_buffer_to_internal_buffer () |
Converts the external buffer to internal form and places the result in the internal buffer. More... | |
void | convert_internal_buffer_to_external_buffer () |
Converts the internal buffer to external form and places the result in the external buffer. More... | |
Protected Member Functions inherited from sheaf::variable_length_record | |
void | put_buf (const void *xbuf, size_t xub) |
Sets the buffer to xbuf. More... | |
bool | delete_buffer () |
True if this allocated the buffer and the dtor should delete it. More... | |
void | put_delete_buffer (bool xval) |
Sets delete_buffer to value xval. More... | |
void * | item (size_t xoffset) const |
Pointer to record item beginning at offset xoffset. More... | |
bool | is_internal () const |
True if the internal buffer has been initialized. More... | |
void | put_is_internal (bool xis_internal) |
Sets is_internal to xis_internal. More... | |
bool | is_external () const |
True if the external buffer has been initialized. More... | |
void | put_is_external (bool xis_external) |
Sets is_external to xis_external. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes | |
std::string | _str_buf |
The internal/external buffer. More... | |
An abstract wrapper/adapter for attributes records. Intended for transferring data between the kernel and the i/o subsystem.
Definition at line 43 of file attributes_record.h.
typedef char* sheaf::attributes_record::hdf_buf_type |
The type of hdf buffer.
Definition at line 50 of file attributes_record.h.
sheaf::attributes_record::attributes_record | ( | const attributes_record & | xother | ) |
Copy constructor.
Not Implemented.
Definition at line 35 of file attributes_record.cc.
References clone(), and invariant().
Referenced by is_ancestor_of().
|
virtual |
Destructor.
Definition at line 81 of file attributes_record.cc.
References invariant().
Referenced by clone().
sheaf::attributes_record::attributes_record | ( | poset_scaffold & | xscaffold | ) |
Creates an instance with type map xtype_map.
Definition at line 160 of file attributes_record.cc.
References internalize(), and invariant().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Is Abstract.
Reimplemented from sheaf::variable_length_record.
Reimplemented in sheaf::poset_general_record, sheaf::member_names_record, sheaf::dof_tuple_class_names_record, sheaf::dof_tuple_col_bounds_record, sheaf::dof_tuple_domain_offsets_record, sheaf::dof_tuple_schema_ids_record, sheaf::dof_tuple_schema_versions_record, sheaf::dof_tuple_types_record, sheaf::member_class_names_record, sheaf::id_space_names_record, sheaf::subposet_names_record, and sheaf::table_dof_tuple_record.
Definition at line 56 of file attributes_record.cc.
References sheaf::any::is_same_type(), and ~attributes_record().
Referenced by attributes_record().
|
protected |
Converts the external buffer to internal form and places the result in the internal buffer.
Definition at line 370 of file attributes_record.cc.
References _str_buf, sheaf::variable_length_record::buf(), sheaf::variable_length_record::buf_ub(), convert_internal_buffer_to_external_buffer(), invariant(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), and sheaf::variable_length_record::put_is_internal().
Referenced by internalize(), and transfer_poset_to_internal_buffer().
|
protected |
Converts the internal buffer to external form and places the result in the external buffer.
Definition at line 397 of file attributes_record.cc.
References _str_buf, invariant(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::variable_length_record::put_buf(), sheaf::variable_length_record::put_delete_buffer(), and sheaf::variable_length_record::put_is_external().
Referenced by convert_external_buffer_to_internal_buffer(), and externalize().
void sheaf::attributes_record::externalize | ( | hdf_buf_type * | xhdf_buffer | ) |
Converts the record from internal to external form.
Definition at line 217 of file attributes_record.cc.
References convert_internal_buffer_to_external_buffer(), sheaf::variable_length_record::is_external(), sheaf::record::scaffold(), transfer_external_buffer_to_HDF(), transfer_HDF_to_external_buffer(), and transfer_poset_to_internal_buffer().
Referenced by sheaf::attributes_record_set::externalize(), and internalize().
void sheaf::attributes_record::internalize | ( | hdf_buf_type * | xhdf_buffer | ) |
Converts the record from external to internal form.
Definition at line 182 of file attributes_record.cc.
References convert_external_buffer_to_internal_buffer(), externalize(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::record::scaffold(), transfer_HDF_to_external_buffer(), and transfer_internal_buffer_to_poset().
Referenced by attributes_record(), and sheaf::attributes_record_set::internalize().
|
virtual |
Class invariant.
Reimplemented from sheaf::variable_length_record.
Reimplemented in sheaf::poset_general_record, sheaf::member_names_record, sheaf::dof_tuple_class_names_record, sheaf::dof_tuple_col_bounds_record, sheaf::dof_tuple_domain_offsets_record, sheaf::dof_tuple_schema_ids_record, sheaf::dof_tuple_schema_versions_record, sheaf::dof_tuple_types_record, sheaf::member_class_names_record, sheaf::id_space_names_record, sheaf::subposet_names_record, and sheaf::table_dof_tuple_record.
Definition at line 100 of file attributes_record.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::variable_length_record::invariant(), sheaf::any::invariant_check(), and is_ancestor_of().
Referenced by attributes_record(), convert_external_buffer_to_internal_buffer(), convert_internal_buffer_to_external_buffer(), sheaf::poset_general_record::invariant(), and ~attributes_record().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::variable_length_record.
Reimplemented in sheaf::poset_general_record, sheaf::member_names_record, sheaf::dof_tuple_class_names_record, sheaf::dof_tuple_col_bounds_record, sheaf::dof_tuple_domain_offsets_record, sheaf::dof_tuple_schema_ids_record, sheaf::dof_tuple_schema_versions_record, sheaf::dof_tuple_types_record, sheaf::member_class_names_record, sheaf::id_space_names_record, sheaf::subposet_names_record, and sheaf::table_dof_tuple_record.
Definition at line 134 of file attributes_record.cc.
References attributes_record().
Referenced by invariant().
|
protected |
Initializes the HDF buffer xbuf from the external buffer.
Definition at line 287 of file attributes_record.cc.
References sheaf::variable_length_record::buf(), sheaf::variable_length_record::is_external(), and transfer_internal_buffer_to_poset().
Referenced by externalize(), and transfer_HDF_to_external_buffer().
|
protected |
Initializes the external buffer from xbuf.
Definition at line 253 of file attributes_record.cc.
References sheaf::variable_length_record::buf(), sheaf::variable_length_record::buf_ub(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::variable_length_record::put_buf(), sheaf::variable_length_record::put_is_external(), sheaf::variable_length_record::put_is_internal(), and transfer_external_buffer_to_HDF().
Referenced by externalize(), and internalize().
|
protectedpure virtual |
Initializes scaffold from the internal buffer.
Implemented in sheaf::poset_general_record, sheaf::member_names_record, sheaf::dof_tuple_class_names_record, sheaf::dof_tuple_col_bounds_record, sheaf::dof_tuple_domain_offsets_record, sheaf::dof_tuple_schema_ids_record, sheaf::dof_tuple_schema_versions_record, sheaf::dof_tuple_types_record, sheaf::member_class_names_record, sheaf::id_space_names_record, sheaf::subposet_names_record, and sheaf::table_dof_tuple_record.
Definition at line 316 of file attributes_record.cc.
References sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::record::scaffold(), and transfer_poset_to_internal_buffer().
Referenced by internalize(), and transfer_external_buffer_to_HDF().
|
protectedpure virtual |
Initializes the internal buffer from the scaffold.
Implemented in sheaf::poset_general_record, sheaf::member_names_record, sheaf::dof_tuple_class_names_record, sheaf::dof_tuple_col_bounds_record, sheaf::dof_tuple_domain_offsets_record, sheaf::dof_tuple_schema_ids_record, sheaf::dof_tuple_schema_versions_record, sheaf::dof_tuple_types_record, sheaf::member_class_names_record, sheaf::id_space_names_record, sheaf::subposet_names_record, and sheaf::table_dof_tuple_record.
Definition at line 347 of file attributes_record.cc.
References convert_external_buffer_to_internal_buffer(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), and sheaf::record::scaffold().
Referenced by externalize(), and transfer_internal_buffer_to_poset().
|
protected |
The internal/external buffer.
Definition at line 137 of file attributes_record.h.
Referenced by convert_external_buffer_to_internal_buffer(), convert_internal_buffer_to_external_buffer(), sheaf::table_dof_tuple_record::transfer_internal_buffer_to_poset(), sheaf::subposet_names_record::transfer_internal_buffer_to_poset(), sheaf::id_space_names_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_schema_ids_record::transfer_internal_buffer_to_poset(), sheaf::member_class_names_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_col_bounds_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_schema_versions_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_types_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_class_names_record::transfer_internal_buffer_to_poset(), sheaf::dof_tuple_domain_offsets_record::transfer_internal_buffer_to_poset(), sheaf::member_names_record::transfer_internal_buffer_to_poset(), sheaf::poset_general_record::transfer_internal_buffer_to_poset(), sheaf::table_dof_tuple_record::transfer_poset_to_internal_buffer(), sheaf::id_space_names_record::transfer_poset_to_internal_buffer(), sheaf::subposet_names_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_domain_offsets_record::transfer_poset_to_internal_buffer(), sheaf::member_class_names_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_types_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_schema_versions_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_class_names_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_schema_ids_record::transfer_poset_to_internal_buffer(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::member_names_record::transfer_poset_to_internal_buffer(), and sheaf::poset_general_record::transfer_poset_to_internal_buffer().