SheafSystem  0.0.0.0
sheaf::poset_general_record Class Reference

A wrapper/adapter for the poset general attributes record. Intended for transferring data between the kernel and the i/o subsystem. More...

#include <poset_general_record.h>

Inheritance diagram for sheaf::poset_general_record:
sheaf::attributes_record sheaf::variable_length_record sheaf::record sheaf::any

Public Member Functions

 poset_general_record (const poset_general_record &xother)
 Copy constructor. More...
 
virtual poset_general_recordclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual ~poset_general_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...
 
 poset_general_record (poset_scaffold &xscaffold)
 Creates an instance with type map xtype_map. More...
 
- Public Member Functions inherited from sheaf::attributes_record
 attributes_record (const attributes_record &xother)
 Copy constructor. More...
 
virtual ~attributes_record ()
 Destructor. 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_scaffoldscaffold ()
 The scaffold for the poset associated with this record (mutable version). More...
 
const poset_scaffoldscaffold () const
 The scaffold for the poset associated with this record (const version). More...
 
poset_data_type_maptype_map ()
 The data type map used to convert data for this record (mutable version). More...
 
const poset_data_type_maptype_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

virtual void transfer_internal_buffer_to_poset ()
 Initializes member with index xmbr_id from the internal buffer. More...
 
virtual void transfer_poset_to_internal_buffer ()
 Initializes the internal buffer from the member with index xmbr_id. More...
 
- Protected Member Functions inherited from sheaf::attributes_record
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...
 
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...
 

Additional Inherited Members

- Public Types inherited from sheaf::attributes_record
typedef char * hdf_buf_type
 The type of hdf buffer. More...
 
- Protected Attributes inherited from sheaf::attributes_record
std::string _str_buf
 The internal/external buffer. More...
 

Detailed Description

A wrapper/adapter for the poset general attributes record. Intended for transferring data between the kernel and the i/o subsystem.

Definition at line 59 of file poset_general_record.h.

Constructor & Destructor Documentation

◆ poset_general_record() [1/2]

sheaf::poset_general_record::poset_general_record ( const poset_general_record xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 37 of file poset_general_record.cc.

References clone(), and invariant().

Referenced by clone(), and is_ancestor_of().

◆ ~poset_general_record()

sheaf::poset_general_record::~poset_general_record ( )
virtual

Destructor.

Definition at line 80 of file poset_general_record.cc.

References invariant().

Referenced by clone().

◆ poset_general_record() [2/2]

sheaf::poset_general_record::poset_general_record ( poset_scaffold xscaffold)

Creates an instance with type map xtype_map.

Postcondition

Definition at line 155 of file poset_general_record.cc.

References invariant(), and transfer_internal_buffer_to_poset().

Member Function Documentation

◆ clone()

sheaf::poset_general_record * sheaf::poset_general_record::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::attributes_record.

Definition at line 56 of file poset_general_record.cc.

References sheaf::any::is_same_type(), poset_general_record(), and ~poset_general_record().

Referenced by poset_general_record().

◆ invariant()

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

◆ is_ancestor_of()

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

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::attributes_record.

Definition at line 132 of file poset_general_record.cc.

References poset_general_record().

Referenced by invariant().

◆ transfer_internal_buffer_to_poset()

void sheaf::poset_general_record::transfer_internal_buffer_to_poset ( )
protectedvirtual

Initializes member with index xmbr_id from the internal buffer.

Precondition
  • scaffold().name_space()->state_is_read_accessible()
Issue:
is this field obsolete?
Todo:
implement mechanism to reserve() eventual size of CRG and powerset, so we can use _member_ct and _subposet_ct. Will also require storing the total subposet ct, not just the non-dof subposet ct. See transfer_poset_to_internal_buffer.
Postcondition

Implements sheaf::attributes_record.

Definition at line 178 of file poset_general_record.cc.

References sheaf::attributes_record::_str_buf, sheaf::poset_state_handle::get_int_id(), sheaf::poset_scaffold::initialize_schema_for_read(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::poset_scaffold::is_versioned(), fiber_bundle::vd_algebra::max(), sheaf::namespace_poset::member_poset(), sheaf::poset_scaffold::name_space(), sheaf::poset_state_handle::new_schema_handle(), sheaf::poset_scaffold::put_member_record_type_aliases(), sheaf::record::scaffold(), sheaf::poset_scaffold::subposets(), and transfer_poset_to_internal_buffer().

Referenced by poset_general_record().

◆ transfer_poset_to_internal_buffer()

void sheaf::poset_general_record::transfer_poset_to_internal_buffer ( )
protectedvirtual

Initializes the internal buffer from the member with index xmbr_id.

Precondition
  • scaffold().structure().state_is_read_accessible()
Hack:
the product subposet hack, ver 2.
Issue:
this won't be true when we replace HDF variable length data types with libSheaf variable length records.
Postcondition
  • !is_external()

Implements sheaf::attributes_record.

Definition at line 335 of file poset_general_record.cc.

References sheaf::attributes_record::_str_buf, sheaf::poset_data_type_map::dof_tuple_id_converter(), sheaf::poset_scaffold::external_schema(), sheaf::schema_poset_member::get_ext_ids(), sheaf::data_converter::internal_index(), sheaf::variable_length_record::is_external(), sheaf::variable_length_record::is_internal(), sheaf::poset_bounds::lb_id(), sheaf::poset_bounds::lb_is_singleton(), sheaf::poset_state_handle::member_ct(), sheaf::poset_scaffold::member_id_space(), sheaf::poset_data_type_map::offset_converter(), sheaf::explicit_index_space_handle::pod(), sheaf::variable_length_record::put_is_external(), sheaf::variable_length_record::put_is_internal(), sheaf::poset_scaffold::row_bounds(), sheaf::poset_state_handle::row_dof_tuple_ct(), sheaf::schema_poset_member::row_dof_tuple_type(), sheaf::record::scaffold(), sheaf::poset_state_handle::schema(), sheaf::poset_scaffold::structure(), sheaf::poset_scaffold::subposet_id_space(), sheaf::poset_scaffold::subposets(), sheaf::poset_data_type_map::toc_converter(), sheaf::poset_scaffold::transfer_schema(), sheaf::poset_state_handle::type_id(), sheaf::record::type_map(), sheaf::poset_component::version(), and sheaf::poset_state_handle::version_ct().

Referenced by transfer_internal_buffer_to_poset().


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