SheafSystem  0.0.0.0
member_record_set.cc
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Implementation for class member_record_set
19 
20 #include "SheafSystem/member_record_set.h"
21 
22 #include "SheafSystem/assert_contract.h"
23 #include "SheafSystem/biorder_itr.h"
24 #include "SheafSystem/data_converter.h"
25 #include "SheafSystem/error_message.h"
26 #include "SheafSystem/implicit_crg_interval.h"
27 #include "SheafSystem/index_space_iterator.h"
28 #include "SheafSystem/interval_index_space_state.h"
29 #include "SheafSystem/preorder_itr.h"
30 #include "SheafSystem/sheaf_file.h"
31 #include "SheafSystem/std_unordered_set.h"
32 #include "SheafSystem/std_string.h"
33 #include "SheafSystem/std_sstream.h"
34 #include "SheafSystem/std_iostream.h"
35 #include "SheafSystem/std_sstream.h"
36 
37 using namespace std;
38 
39 //#define DIAGNOSTIC_OUTPUT
40 // #undef DIAGNOSTIC_OUTPUT
41 
42 namespace
43 {
44  //
45  // The rank of the dataspace for the data set.
46  //
47  const int DATASPACE_RANK = 1;
48 }
49 
50 
51 
52 // =============================================================================
53 // ANY FACET
54 // =============================================================================
55 
59 clone() const
60 {
61  member_record_set* result;
62 
63  // Preconditions:
64 
65  // Body:
66 
67  result = new member_record_set(*this);
68 
69  // Postconditions:
70 
71  ensure(result != 0);
72  ensure(is_same_type(result));
73 
74  // Exit:
75 
76  return result;
77 }
78 
79 
81 bool
83 invariant() const
84 {
85  bool result = true;
86 
87  // Preconditions:
88 
89  // Body:
90 
91  // Must satisfy base class invariant
92 
93  result = result && record_set::invariant();
94 
95  if(invariant_check())
96  {
97  // Prevent recursive calls to invariant
98 
99  disable_invariant_check();
100 
101  invariance(is_open() ? _ext_dataspace_rank == DATASPACE_RANK : true);
102 
103  // Finished, turn invariant checking back on.
104 
105  enable_invariant_check();
106  }
107 
108  // Postconditions:
109 
110  // Exit
111 
112  return result;
113 }
114 
116 bool
118 is_ancestor_of(const any* other) const
119 {
120 
121  // Preconditions:
122 
123  require(other != 0);
124 
125  // Body:
126 
127  // True if other conforms to this
128 
129  bool result = dynamic_cast<const member_record_set*>(other) != 0;
130 
131  // Postconditions:
132 
133  return result;
134 
135 }
136 
137 
138 // =============================================================================
139 // MEMBER_RECORD_SET FACET
140 // =============================================================================
141 
145  int xrecord_buffer_ub,
146  const poset_scaffold& xscaffold,
147  const dof_tuple_record_set& xdof_tuple_records)
148  : record_set(xfile, xrecord_buffer_ub, xscaffold),
149  _record(*this),
150  _scaffold(const_cast<poset_scaffold&>(xscaffold)),
151  _dof_tuple_records(const_cast<dof_tuple_record_set&>(xdof_tuple_records)),
152  _id_space_record(*this)
153 {
154 
155  // Preconditions:
156 
157  require(xfile.is_open());
158  require(xrecord_buffer_ub > 0);
159  require(scaffold().structure().state_is_read_accessible());
160 
161  // Body:
162 
163  _record_id_space.attach_to(xscaffold.member_id_space());
164 
165  // Construct the interval id space.
166 
167  poset_state_handle& lposet = _scaffold.structure();
168 
169  stringstream linterval_id_space_str;
170  linterval_id_space_str << _record_id_space.name() << "_interval";
171  linterval_id_space_str >> _interval_id_space_name;
172 
173  _interval_id_space =
175  _interval_id_space_name,
176  false, false);
177 
178  // _name has been initialized to poset name in record_set;
179  // add members dataset suffix to it.
180 
181  _name = data_set_name(scaffold().structure().name());
182  _alias = data_set_alias(scaffold().structure().name());
183 
184  _ext_dataspace_rank = DATASPACE_RANK;
185  _ext_dataspace_dims = new hsize_t[DATASPACE_RANK];
186 
187  // Create and initialize the HDF record buffer
188 
189  _hdf_bufs = new hvl_t[record_buffer_ub()];
190  for(size_t i=0; i<record_buffer_ub(); i++)
191  {
192  hvl_t* ltmp = _hdf_bufs+i;
193  ltmp->p = 0;
194  ltmp->len = 0;
195  }
196 
197  // Create the selection buffer
198 
199  _hdf_selection = new hsize_t[record_buffer_ub()][DATASPACE_RANK];
200 
201  // Postconditions:
202 
203  ensure(invariant());
204  ensure(name() == data_set_name(scaffold().structure().name()));
205  ensure(alias() == data_set_alias(scaffold().structure().name()));
206  ensure(!is_open());
207  ensure(record_buffer_ub() == xrecord_buffer_ub);
208  ensure(record_buffer_is_empty());
209 }
210 
214  : record_set(xother),
215  _record(xother._record),
216  _scaffold(xother._scaffold),
217  _dof_tuple_records(xother._dof_tuple_records),
218  _id_space_record(xother._id_space_record),
219  _record_id_space(xother._record_id_space),
220  _interval_id_space_name(xother._interval_id_space_name),
221  _interval_id_space(xother._interval_id_space)
222 {
223 
224  // Preconditions:
225 
226 
227  // Body:
228 
229  not_implemented();
230 
231  // Postconditions:
232 
233  ensure(invariant());
234 }
235 
239 {
240  // Preconditions:
241 
242  // Body:
243 
244  delete [] _ext_dataspace_dims;
245  delete [] _hdf_selection;
246  delete [] _hdf_bufs;
247 
253 
254  _scaffold.structure().get_read_access();
255  _scaffold.structure().member_id_spaces(false).delete_space(_interval_id_space_name);
256  _scaffold.structure().release_access();
257 
258  // Postconditions:
259 
260  // Exit:
261 
262  return;
263 }
264 
265 
266 const std::string&
268 suffix() const
269 {
270  // cout << endl << "Entering member_record_set::suffix." << endl;
271 
272  // Preconditions:
273 
274 
275  // Body:
276 
277  static const string result(".members");
278 
279  // Postconditions:
280 
281 
282  // Exit:
283 
284  // cout << "Leaving member_record_set::suffix." << endl;
285  return result;
286 }
287 
288 
290 void
292 internalize(pod_index_type xmax_row_int_id)
293 {
294 
295  // Preconditions:
296 
297  require(is_open());
298  require(scaffold().structure().state_is_read_write_accessible());
299 
300  // Body:
301 
302 #ifdef DIAGNOSTIC_OUTPUT
303  cout << endl << endl << "member_record_set::internalize: internalizing record set " << name() << endl;
304 #endif
305 
306  poset_state_handle& lposet = scaffold().structure();
307 
308  // Initialize the dof tuple id id space.
309 
310  _scaffold.initialize_dof_tuple_id_space();
311 
312  // Read the file id and interval id spaces.
313 
314  read_id_space_record(_record_id_space, record_id_space_record());
315  read_id_space_record(_interval_id_space, interval_id_space_record());
316 
317  // Allocate ids in file scope and internal scope.
318 
319  record_index lext_id(_record_id_space);
320  scoped_index linterval_id(lposet.member_id(false));
321 
322  // Get a handle to the max row member.
323 
324  abstract_poset_member& lmax_row_mbr = *lposet.top().clone();
325  lmax_row_mbr.attach_to_state(&lposet, xmax_row_int_id);
326 
327  // Get a handle to the resident subposet.
328 
329  subposet& lresident_sp = scaffold().resident();
330 
331  // Put the poset in jim edit mode.
332 
333  lposet.begin_jim_edit_mode(false);
334 
335  // The size of the upper cover of bottom == #atoms == O(#jims)
336  // and hence can be quite large. For efficiency we never write
337  // it to the file and reconstruct it when we read the file,
338  // see member_record::transfer_lower_cover_to_member.
339  // Remove any existing links so we won't have duplicates.
340 
341  lposet.bottom().clear_cover(UPPER);
342 
343  // Traverse the down-set of the poset in depth-first preorder,
344  // internalizing and building the lower cover in front of the traversal.
345 
346  // $$SCRIBBLE: implicit-cover-reorganization
347  // Only read interval members.
348 
349 // typedef set_preorder_itr itr_type;
350 
351 // itr_type litr(lmax_row_mbr, DOWN, NOT_STRICT);
352 // while(!litr.is_done())
353 // {
354 
355 // #ifdef DIAGNOSTIC_OUTPUT
356 // cout << "member_record_set::internalize: internalizing member: " << litr.index()
357 // << " is_resident= " << boolalpha << lresident_sp.contains_member(litr.index()) << noboolalpha
358 // << endl;
359 // #endif
360 
361 // if(!lresident_sp.contains_member(litr.index()))
362 // {
363 // // Lower cover of the member is still external.
364 
365 // // $$SCRIBBLE: what is the proper condition here?
366 // // We need to be able to treat a interval as a jrm with its implicit down set
367 // // or as a non-resident jim, without a down set. See the truncation and
368 // // link handling logic in member_record::transfer_internal_buffer_to_member.
369 
370 // // if(lposet.is_jrm(xmbr_id) && lposet.is_atom(xmbr_id))
371 // // {
372 // // // Member has been temporarily linked to the bottom,
373 // // // delete the link.
374 
375 // /// /// @issue this could be an expensive operation.
376 // /// /// The upper cover of bottom can get very large and
377 // /// /// with the list rep for list_cover_set, delete
378 // /// /// requires a linear search of the cover set .
379 
380 // /// /// @todo optimize the upper cover of bottom.
381 
382 // // lposet.delete_link(xmbr_id, BOTTOM_INDEX);
383 // // }
384 
385 // if(must_read_interval_member(litr.index(), linterval_id))
386 // {
387 // read_member(linterval_id, lext_id);
388 // }
389 
390 // read_member(litr.index(), lext_id);
391 
392 // } // end if not resident
393 
394 // litr.next();
395 // } // end down set iteration
396 
397  typedef set_preorder_itr itr_type;
398 
399  itr_type litr(lmax_row_mbr, DOWN, NOT_STRICT);
400 
401  scoped_index lmbr_id(lmax_row_mbr.hub_id());
402 
403  while(!litr.is_done())
404  {
405 
406 #ifdef DIAGNOSTIC_OUTPUT
407  cout << "member_record_set::internalize: internalizing member: " << litr.index()
408  << " is_resident= " << boolalpha << lresident_sp.contains_member(litr.index()) << noboolalpha
409  << endl;
410 #endif
411 
412  pod_index_type lhub_pod = litr.index().hub_pod();
413  pod_index_type linterval_begin = _interval_id_space.interval_begin(lhub_pod);
414 
415  if(!lresident_sp.contains_member(lhub_pod))
416  {
417  // Lower cover of the member is still external.
418 
419  if(is_valid(linterval_begin))
420  {
421  // Member is implicit.
422 
423  if(lhub_pod == linterval_begin)
424  {
425  // The member is the interval member, read it.
426 
427  read_member(litr.index(), lext_id);
428 
429  // Read explicit members in the down set of the interval.
430 
431  set<pod_index_type> ldown_set;
432  implicit_crg_interval* linterval = lmax_row_mbr.host()->crg().implicit_member(lhub_pod);
433  lmax_row_mbr.host()->crg().explicit_down_set_members(*linterval, ldown_set);
434 
435  set<pod_index_type>::const_iterator litr;
436  for(litr = ldown_set.begin(); litr != ldown_set.end(); ++litr)
437  {
438  if(!lresident_sp.contains_member(*litr) == 0)
439  {
440  // The explicit member has not been read, read it.
441 
442  lmbr_id = *litr;
443 
444  read_member(lmbr_id, lext_id);
445  }
446  }
447  }
448  else
449  {
450  // Do not read members that are not the interval member.
451  }
452 
453  // Do not iterate the downset of a interval.
454 
455  litr.truncate();
456  }
457  else
458  {
459  // Member is explicit, read it and continue.
460 
461  read_member(litr.index(), lext_id);
462 
463  litr.next();
464  }
465  }
466  else
467  {
468  // The member has already been read.
469 
470  if(is_valid(linterval_begin))
471  {
472  // Do not iterate the downset of a interval.
473 
474  litr.truncate();
475  }
476  else
477  {
478  // Continue iterating.
479 
480  litr.next();
481  }
482  }
483  } // end down set iteration
484 
485  // Clean up the upper covers.
486 
487  clean_upper_covers();
488 
489  // Finished with edit mode.
490 
491  lposet.end_jim_edit_mode(true, false);
492 
493  // Postconditions:
494 
495  ensure(is_open());
496 
497  // Exit
498 
499  return;
500 }
501 
502 void
504 internalize(const scoped_index& xmax_row_int_id)
505 {
506  // Preconditions:
507 
508  require(is_open());
509  require(scaffold().structure().state_is_read_write_accessible());
510 
511  // Body:
512 
513  internalize(xmax_row_int_id.hub_pod());
514 
515  // Postconditions:
516 
517  ensure(is_open());
518 
519  // Exit
520 
521  return;
522 }
523 
524 void
526 externalize(pod_index_type xmax_row_int_id)
527 {
528  // Preconditions:
529 
530  require(is_open());
531  require(scaffold().structure().state_is_read_accessible());
532  require(!record().has_equivalence_iterator());
533 
534  // Body:
535 
536 #ifdef DIAGNOSTIC_OUTPUT
537  cout << endl << endl << "externalizing record set " << name() << endl;
538 #endif
539 
540  // Initialize the record buffer.
541 
543 
544  // Get a handle to the max row member.
545 
546  // $$SCRIBBLE: need some less verbose method of creating an iterator
547  // given an index. Some sort of virtual member handle constructor
548  // e.g. abstract_poset_member* psh::new_member(scoped_index) might be useful.
549 
550  poset_state_handle& lposet = scaffold().structure();
551  abstract_poset_member* lmax_row_mbr = lposet.top().clone();
552  lmax_row_mbr->attach_to_state(&lposet, xmax_row_int_id);
553  lmax_row_mbr->put_version(COARSEST_COMMON_REFINEMENT_VERSION);
554 
555  // Make the equivalence iterator.
556 
557  _record.new_equivalence_iterator();
558 
559  // Create the record and interval id spacess.
560 
561  make_idorder_file_id_spaces(*lmax_row_mbr);
562 
563  // Write the file id and interval id spaces.
564 
565  write_id_space_record(_record_id_space, record_id_space_record());
566  write_id_space_record(_interval_id_space, interval_id_space_record());
567 
568  // Now traverse the down-set, externalizing the members.
569  // Whenever the record buffer is full, and when we're done,
570  // write out the record buffer.
571 
572  record_index lext_id(_record_id_space);
573 
574  index_space_iterator& litr = _record_id_space.get_iterator();
575 
576  while(!litr.is_done())
577  {
578  // Get the external id.
579 
580  lext_id = litr.pod();
581 
582  assertion(lmax_row_mbr->host()->contains_member(lext_id));
583 
584  // This member has an explicit record in the file;
585  // get the HDF buffer for this record
586 
587  assertion(record_buffer_ct() < record_buffer_ub());
588  hvl_t* lhdf_buf = _hdf_bufs+record_buffer_ct();
589 
590  // Attach the transfer record to the member
591  // and the HDF buffer and externalize it.
592 
593  _record.externalize(lext_id, lhdf_buf);
594 
595  // Enter the record id in the HDF selection
596 
597  assertion(record_buffer_ct() < record_buffer_ub());
598 
599  _hdf_selection[record_buffer_ct()][0] = lext_id.pod();
600 
601  // Increment the number of active records.
602 
604 
605  // If the record buffer is full, write the selection to disk.
606 
608  {
609  write_record_buffer();
610  }
611 
612  litr.next();
613  }
614 
615  _record_id_space.release_iterator(litr);
616 
617  // If the record buffer is not empty,
618  // write the selection to disk.
619 
621  {
622  write_record_buffer();
623  }
624 
625  // Destroy the equivalence iterator.
626 
627  _record.delete_equivalence_iterator();
628 
629  // Delete row member.
630 
631  lmax_row_mbr->detach_from_state();
632  delete lmax_row_mbr;
633 
634  // Postconditions:
635 
636  ensure(is_open());
637  ensure(!record().has_equivalence_iterator());
638 
639  // Exit
640 
641  return;
642 }
643 
644 void
646 externalize(const scoped_index& xmax_row_int_id)
647 {
648  // Preconditions:
649 
650  require(is_open());
651  require(scaffold().structure().state_is_read_accessible());
652  require(!record().has_equivalence_iterator());
653 
654  // Body:
655 
656  externalize(xmax_row_int_id.hub_pod());
657 
658  // Postconditions:
659 
660  ensure(is_open());
661  ensure(!record().has_equivalence_iterator());
662 
663  // Exit
664 
665  return;
666 }
667 
671 {
672  return _dof_tuple_records;
673 }
674 
677 record() const
678 {
679  return _record;
680 }
681 
686 {
687  static const pod_index_type result = interval_id_space_record() + 1;
688  return result;
689 }
690 
691 // =============================================================================
692 // PROTECTED MEMBER FUNCTIONS
693 // =============================================================================
694 
696 hid_t
699 {
700  hid_t result;
701 
702  // Preconditions:
703 
704  require(file().mode() == sheaf_file::READ_WRITE);
705 
706  // Body:
707 
708  // Create an extendible dataspace.
710 
711  // Set the initial dimension.
712 
713  hsize_t linit_dims[DATASPACE_RANK];
714  linit_dims[0] = _record_buffer_ub;
715 
716  // Maximum dimension.
717  // We'll only extend along the first index.
718 
719  hsize_t lmax_dims[DATASPACE_RANK];
720  lmax_dims[0] = H5S_UNLIMITED;
721 
722  _ext_dataspace_hdf_id = H5Screate_simple(DATASPACE_RANK, linit_dims, lmax_dims);
723  if(_ext_dataspace_hdf_id < 0)
724  {
725  post_fatal_error_message("can't create exterior dataspace");
726  }
727 
728  // We'll need a chunked dataset.
729  // Create the chunk dimension.
730 
731  hsize_t lchunk_dims[DATASPACE_RANK];
732  lchunk_dims[0] = _record_buffer_ub;
733 
734  // Create the property list for the chunked dataset
735 
736  hid_t lparms = H5Pcreate(H5P_DATASET_CREATE);
737  herr_t status = H5Pset_chunk( lparms, DATASPACE_RANK, lchunk_dims);
738  if(status < 0)
739  {
740  post_fatal_error_message("can't set chunk size");
741  }
742 
743  // Create the dataset with the internal data type.
744  // External data type will be set in record_set::open by querying the dataset.
745 
746  // result = H5Dcreate(file().hdf_id(),
747  result = H5Dcreate1(file().hdf_id(),
748  name().c_str(),
751  lparms);
752  if(result <0)
753  {
754  post_fatal_error_message("Unable to create dataset.");
755  }
756 
757  // Postconditions:
758 
759  ensure(result >= 0);
760 
761  // Exit
762 
763  return result;
764 }
765 
767 void
770 {
771  // Preconditions:
772 
773  require(file().is_open());
774 
775  // Body:
776 
777  // Data type is variable length int.
778 
780  H5Tvlen_create(type_map().converter(POD_INDEX_TYPE)->internal_type());
781 
782  if(_int_data_type_hdf_id < 0)
783  {
784  post_fatal_error_message("Can't create internal data type");
785  }
786 
787  // Postconditions:
788 
789  ensure(int_data_type_hdf_id() >= 0);
790 
791  // Exit:
792 
793  return;
794 }
795 
797 void
799 read_record(const record_index& xext_id)
800 {
801  // Preconditions:
802 
803  // Body:
804 
807 
808  // Make some convenient local variables.
809 
810  scoped_index lmbr_id(_record_id_space.hub_id_space());
811 
812  // Enter the record id in the HDF selection
813 
814  _hdf_selection[record_buffer_ct()][0] = xext_id.pod();
815 
816  // Increment the number of active records in the buffer.
817 
819 
820  // Read the selection.
821 
822  read_selection();
823 
824  // Internalize the records in the record buffer.
825 
826  for(int i=0; i<record_buffer_ct(); i++)
827  {
828 
829  // Get the internal member id for this record.
830 
831  lmbr_id = _record_id_space.hub_pod(_hdf_selection[i][0]);
832 
833  // Get the HDF buffer for this record
834 
835  assertion(i < record_buffer_ub());
836  hvl_t* lhdf_buf = _hdf_bufs+i;
837 
838 #ifdef DIAGNOSTIC_OUTPUT
839  cout << "member_record_set::read_record: record: " << _hdf_selection[i][0]
840  << " member id: " << lmbr_id
841  << " buf len: " << lhdf_buf->len
842  << endl;
843 #endif
844 
845  // Attach the transfer record to the member
846  // and the HDF buffer and internalize it.
847 
848  assertion(lhdf_buf->len > 0);
849 
850  _record.internalize(lhdf_buf, lmbr_id);
851  }
852 
853  // Reclaim the storage allocated by HDF.
854 
855  delete_hdf_buffers();
856 
857  // Reset the number of active records.
858 
860 
861  // Postconditions:
862 
863  // Exit
864 
865  return;
866 }
867 
868 
869 
871 void
874 {
875  // Preconditions:
876 
877  require(is_open());
878 
879  // Body:
880 
881  // Create the interior dataspace to describe the HDF record buffer.
882  // Have to create the interior dataspace on each write to match
883  // the size of the dataspace to the selection.
884 
886 
887  // Set the selection.
888  // The following cast is FM taken from HDF source. H5S_point_add immediately
889  // casts arg to hsize_t*, which it thinks is pointing at the first element
890  // in the array.
891 
892  // const hsize_t** lselect = reinterpret_cast<const hsize_t**>(_hdf_selection);
893  const hsize_t* lselect = &(_hdf_selection[0][0]);
894 
895  herr_t status = H5Sselect_elements(_ext_dataspace_hdf_id, H5S_SELECT_SET, record_buffer_ct(), lselect);
896  if(status < 0)
897  {
898  post_fatal_error_message("can't set member record read selection");
899  }
900 
901  // Read the selected records
902 
904  _ext_dataspace_hdf_id, H5P_DEFAULT, _hdf_bufs);
905  if(status < 0)
906  {
907  post_fatal_error_message("can't read member record selection");
908  }
909 
910  // Postconditions:
911 
912  // Exit
913 
914  return;
915 }
916 
917 
919 void
922 {
923  // Preconditions:
924 
925  require(is_open());
926 
927  // Body:
928 
929  // Create the interior dataspace to describe the HDF record buffer.
930  // Have to create the interior dataspace on each write to match
931  // the size of the dataspace to the selection.
932 
934 
935  // Extend the dataset to include the selection;
936 
937  hsize_t ldims[DATASPACE_RANK];
938 
939  ldims[0] = scaffold().member_id_space().end();
940 
941  extend_dataset(ldims, DATASPACE_RANK);
942 
943  // Set the selection.
944  // The following cast is FM taken from HDF source. H5S_point_add immediately
945  // casts arg to hsize_t*, which it thinks is pointing at the first element
946  // in the array.
947 
948  // const hsize_t** lselect = reinterpret_cast<const hsize_t**>(_hdf_selection);
949  const hsize_t* lselect = &(_hdf_selection[0][0]);
950 
951  herr_t status = H5Sselect_elements(_ext_dataspace_hdf_id, H5S_SELECT_SET, _record_buffer_ct, lselect);
952  if(status < 0)
953  {
954  post_fatal_error_message("can't set member record write selection");
955  }
956 
957  // Write the selected records
958 
960  _ext_dataspace_hdf_id, H5P_DEFAULT, _hdf_bufs);
961  if(status < 0)
962  {
963  post_fatal_error_message("can't write member record selection");
964  }
965 
966  // Postconditions:
967 
968  // Exit
969 
970  return;
971 }
972 
974 void
977 {
978  // Preconditions:
979 
980  require(is_open());
981 
982  // Body:
983 
984  // Create the interior dataspace to describe the HDF record buffer.
985  // Have to create the interior dataspace on each write to match
986  // the size of the dataspace to the selection.
987 
988  if(_int_dataspace_hdf_id >= 0)
989  {
990  H5Sclose(_int_dataspace_hdf_id);
991  }
992 
993  hsize_t linit_dims[DATASPACE_RANK];
994  linit_dims[0] = _record_buffer_ct;
995 
996  _int_dataspace_hdf_id = H5Screate_simple(DATASPACE_RANK, linit_dims, NULL);
997  if(_int_dataspace_hdf_id < 0)
998  {
999  post_fatal_error_message("can't create interior data space");
1000  }
1001 
1002  // Postconditions:
1003 
1004  ensure(_int_dataspace_hdf_id >= 0);
1005 
1006  // Exit
1007 
1008  return;
1009 }
1010 
1011 
1012 // =============================================================================
1013 // PRIVATE MEMBER FUNCTIONS
1014 // =============================================================================
1015 
1017 void
1018 sheaf::member_record_set::
1019 delete_external_buffers()
1020 {
1021  // Preconditions:
1022 
1023  // Body:
1024 
1025  for(size_t i=0; i<record_buffer_ct(); i++)
1026  {
1027  hvl_t* ltmp = _hdf_bufs+i;
1028  if(ltmp->p != 0)
1029  {
1030  delete [] reinterpret_cast<int*>(ltmp->p);
1031  ltmp->p = 0;
1032  ltmp->len = 0;
1033  }
1034  }
1035 
1036  // Postconditions:
1037 
1038  ensure_for_all(i, 0, record_buffer_ct(), (_hdf_bufs[i].p == 0));
1039  ensure_for_all(i, 0, record_buffer_ct(), (_hdf_bufs[i].len == 0));
1040 
1041  // Exit:
1042 
1043  return;
1044 }
1045 
1046 
1048 void
1049 sheaf::member_record_set::
1050 delete_hdf_buffers()
1051 {
1052  // Preconditions:
1053 
1054  // Body:
1055 
1056  herr_t status =
1058  H5P_DEFAULT, _hdf_bufs);
1059  if(status < 0)
1060  {
1061  post_fatal_error_message("can't delete hdf buffers");
1062  }
1063 
1064  // Tracing and inspecting the source of HDF (as of ver 1.4.2 at least)
1065  // suggests that it the above call deallocates the variable length
1066  // buffers the read operation allocated, but only zeroes the hvl_t p and len
1067  // members for certain compound VL types, not for simple VL types.
1068  // So zero it out directly:
1069 
1070  hvl_t* lbuf = _hdf_bufs;
1071  hvl_t* lbuf_ub = lbuf+record_buffer_ct();
1072  while(lbuf < lbuf_ub)
1073  {
1074  lbuf->p = 0;
1075  lbuf->len = 0;
1076  lbuf++;
1077  }
1078 
1079  // Postconditions:
1080 
1081  ensure_for_all(i, 0, record_buffer_ct(), (_hdf_bufs[i].p == 0));
1082  ensure_for_all(i, 0, record_buffer_ct(), (_hdf_bufs[i].len == 0));
1083 
1084  // Exit:
1085 
1086  return;
1087 }
1088 
1089 
1090 
1091 
1093 void
1094 sheaf::member_record_set::
1095 write_record_buffer()
1096 {
1097  // Preconditions:
1098 
1099  require(!record_buffer_is_empty());
1100 
1101  // Body:
1102 
1103 
1104 #ifdef DIAGNOSTIC_OUTPUT
1105  cout << "member_record_set::write_record_buffer" << endl;
1106  cout << "\twriting member_record buffer for dataset " << name() << endl;
1107 #endif
1108 
1109  write_selection();
1110  delete_external_buffers();
1112 
1113  // Postconditions:
1114 
1115  ensure(record_buffer_is_empty());
1116 
1117  // Exit:
1118 
1119  return;
1120 }
1121 
1122 void
1123 sheaf::member_record_set::
1124 clean_upper_covers()
1125 {
1126  // Preconditions:
1127 
1128 
1129  // Body:
1130 
1131  // If we read the down set of anything
1132  // other than the top of the poset, the upper covers may
1133  // contain dangling links to members that weren't read.
1134  // Search all explicit upper covers, deleting dangling links.
1135 
1136  poset_state_handle& lposet = scaffold().structure();
1137  poset_crg_state& lcrg = lposet.crg();
1138 
1139  index_iterator litr = lposet.member_iterator();
1140  while(!litr.is_done())
1141  {
1142  // Clean up the upper cover.
1143 
1144  lcrg.clean_cover(UPPER, litr.index().pod());
1145  litr.next();
1146  }
1147 
1148  // Postconditions:
1149 
1150 
1151  // Exit:
1152 
1153  return;
1154 }
1155 
1157 sheaf::member_record_set::
1158 record_id_space_record()
1159 {
1160  static const pod_index_type result = 0;
1161  return result;
1162 }
1163 
1166 sheaf::member_record_set::
1167 interval_id_space_record()
1168 {
1169  static const pod_index_type result = 1;
1170  return result;
1171 }
1172 
1174 void
1175 sheaf::member_record_set::
1176 write_id_space_record(const interval_index_space_handle& xid_space, pod_index_type xrecord_id)
1177 {
1178  // Preconditions:
1179 
1180 
1181  // Body:
1182 
1183  // Get the HDF buffer for this record
1184 
1185  assertion(record_buffer_ct() < record_buffer_ub());
1186  hvl_t* lhdf_buf = _hdf_bufs+record_buffer_ct();
1187 
1188  // Attach the transfer record to the member
1189  // and the HDF buffer and externalize it.
1190 
1191  _id_space_record.externalize(lhdf_buf, xid_space);
1192 
1193  // Enter the record id in the HDF selection
1194 
1195  assertion(record_buffer_ct() < record_buffer_ub());
1196 
1197  _hdf_selection[record_buffer_ct()][0] = xrecord_id;
1198 
1199  // Increment the number of active records.
1200 
1202 
1203  // Postconditions:
1204 
1205 
1206  // Exit:
1207 
1208  return;
1209 }
1210 
1212 void
1213 sheaf::member_record_set::
1214 read_id_space_record(interval_index_space_handle& xid_space, pod_index_type xrecord_id)
1215 {
1216  // Preconditions:
1217 
1218  // Body:
1219 
1222 
1223  // Enter the record id in the HDF selection
1224 
1225  _hdf_selection[record_buffer_ct()][0] = xrecord_id;
1226 
1227  // Increment the number of active records in the buffer.
1228 
1230 
1231  // Read the selection.
1232 
1233  read_selection();
1234 
1235  // Internalize the records in the record buffer.
1236 
1237  for(int i=0; i<record_buffer_ct(); i++)
1238  {
1239  // Get the HDF buffer for this record
1240 
1241  assertion(i < record_buffer_ub());
1242  hvl_t* lhdf_buf = _hdf_bufs+i;
1243 
1244 #ifdef DIAGNOSTIC_OUTPUT
1245  cout << "member_record_set::read_id_space_record: record: " << _hdf_selection[i][0]
1246  << " buf len: " << lhdf_buf->len
1247  << endl;
1248 #endif
1249 
1250  // Attach the transfer record to the member
1251  // and the HDF buffer and internalize it.
1252 
1253  _id_space_record.internalize(lhdf_buf, xid_space);
1254  }
1255 
1256  // Reclaim the storage allocated by HDF.
1257 
1258  delete_hdf_buffers();
1259 
1260  // Reset the number of active records.
1261 
1263 
1264  // Postconditions:
1265 
1266  // Exit
1267 
1268  return;
1269 }
1270 
1271 
1272 void
1273 sheaf::member_record_set::
1274 read_member(const scoped_index& xindex, record_index& xext_id)
1275 {
1276  // Preconditions:
1277 
1278 
1279  // Body:
1280 
1281  xindex >> xext_id;
1282 
1283  if(xext_id.is_valid())
1284  {
1285  // Member has an explicit record; read it.
1286 
1287  read_record(xext_id);
1288 
1289  if(_record.is_resident())
1290  {
1291  // The member is now fully resident; mark it so.
1292 
1293  scaffold().resident().insert_member(xindex);
1294  }
1295  }
1296  else
1297  {
1298  // Member doesn't have an explicit record;
1299  // must be an implicit member created as
1300  // part of a interval; just mark it resident.
1301 
1302  scaffold().resident().insert_member(xindex);
1303  }
1304 
1305  // Postconditions:
1306 
1307 
1308  // Exit:
1309 
1310  return;
1311 }
1312 
1314 void
1315 sheaf::member_record_set::
1316 make_idorder_file_id_spaces(const abstract_poset_member& xmbr)
1317 {
1318  // Preconditions:
1319 
1320  require(record().has_equivalence_iterator());
1321 
1322  // Body:
1323 
1324 #ifdef DIAGNOSTIC_OUTPUT
1325  cout << "make_id_order_file_id_spaces for " << xmbr.host()->name() << endl;
1326 #endif
1327 
1328  // Initialize the file id space, leaving room for the
1329  // id space itself in the first record.
1330 
1331  pod_index_type lext_id_pod = first_member_record();
1332 
1333  // Initialize the interval id space.
1334 
1335  _interval_id_space.clear();
1336 
1337  set<pod_index_type> ldown_set;
1339  while(!lpreitr.is_done())
1340  {
1341  pod_index_type lhub_pod = lpreitr.index().hub_pod();
1342  implicit_crg_interval* linterval = xmbr.host()->crg().implicit_member(lhub_pod);
1343 
1344  if(linterval != 0)
1345  {
1346  if(lhub_pod == linterval->interval_member())
1347  {
1348  // Add the interval member to the down set.
1349 
1350  ldown_set.insert(lhub_pod);
1351 
1352  // Add the explicit members in the down set of the interval.
1353 
1354  xmbr.host()->crg().explicit_down_set_members(*linterval, ldown_set);
1355  }
1356  else
1357  {
1358  // Do nothing.
1359  // Don't include members that are not the interval member in the down set.
1360  }
1361 
1362  // Do not visit the down set of the interval members.
1363 
1364  lpreitr.truncate();
1365  }
1366  else
1367  {
1368  // Insert the explicit member.
1369 
1370  ldown_set.insert(lhub_pod);
1371 
1372  lpreitr.next();
1373  }
1374  }
1375 
1376  // If the poset has not had any members created in it, then
1377  // it contains only bottom and top and there is not link
1378  // between them, so the preceding iteration doesn't get
1379  // bottom. Make sure bottom is in the downset.
1380  // This ensures bottom is in the record_id_space, which is required
1381  // by attributes_record_set::write_toc_bounds_attribute.
1382 
1383  ldown_set.insert(BOTTOM_INDEX);
1384 
1385  // Traverse the down-set of the poset in internal id order,
1386  // building the record and interval id_spaces.
1387 
1388  set<pod_index_type>::iterator litr = ldown_set.begin();
1389 
1390  while(litr != ldown_set.end())
1391  {
1392  size_type lsize = _record.external_size(xmbr.hub_id(*litr));
1393  if(lsize > 0)
1394  {
1395  _record_id_space.insert(lext_id_pod, *litr);
1396  lext_id_pod++;
1397  }
1398 
1399  implicit_crg_interval* linterval = _record.interval();
1400 
1401  if(linterval != 0)
1402  {
1403  assertion(*litr == linterval->interval_member());
1404 
1405  // This is the first member of an implicit interval.
1406  // Make an entry in the interval map so we can map members
1407  // in the interval back to the implicit interval member
1408  // that represents them. This works by putting a single
1409  // entry into the map for the implicit interval member
1410  // then using the interval_begin query on the map. See
1411  // function must_read_interval_member. This technique only
1412  // uses the interval of the map, not the domain, so it
1413  // doesn't actually matter what we put in for the domain.
1414 
1415  pod_index_type lbegin = linterval->begin();
1416  pod_index_type lend = linterval->end();
1417 
1418  // The impliciot interval is a half open interval [lbegin, lend)
1419  // but the interval map stores closed intervals, so decrement lend.
1420 
1421  --lend;
1422 
1423 #ifdef DIAGNOSTIC_OUTPUT
1424  cout << "inserting interval map interval: "
1425  << " " << lbegin
1426  << " " << lend
1427  << " " << lbegin
1428  << " " << lend
1429  << endl;
1430 #endif
1431 
1432  _interval_id_space.insert_interval(lbegin, lend, lbegin, lend);
1433  }
1434 
1435 #ifdef DIAGNOSTIC_OUTPUT
1436  cout << "id: " << lint_id << " linterval:" << linterval;
1437  if(linterval != 0)
1438  {
1439  cout << " interval_member: " << linterval->interval_member();
1440  }
1441  cout << endl;
1442 #endif
1443 
1444  ++litr;
1445  }
1446 
1447 #ifdef DIAGNOSTIC_OUTPUT
1448  cout << xmbr.host()->name() << " file id space:" << endl;
1449  _record_id_space.print_map_rep(cout);
1450  cout << _record_id_space << endl;
1451  cout << endl << "interval id space:" << endl;
1452  _interval_id_space.print_map_rep(cout);
1453  cout << _interval_id_space << endl;
1454 #endif
1455 
1456  // Postconditions:
1457 
1458 
1459  // Exit:
1460 
1461  return;
1462 }
An implementation of class scattered_insertion_index_space_handle that has a interval id space state...
An encapsulation of an HDF file containing sheaf data.
Definition: sheaf_file.h:49
virtual void put_version(int xversion, bool xunalias=false)
Sets version to (possibly aliased) xversion. If unalias == true, set version to the actual version al...
int _ext_dataspace_rank
The rank of the dataspace for the record_set.
Definition: record_set.h:420
poset_state_handle * host() const
The poset which this is a handle to a component of.
A client handle for a subposet.
Definition: subposet.h:86
void delete_equivalence_iterator()
Destroy the equivalence iterator.
hsize_t * _ext_dataspace_dims
The current dimensions of the external dataspace.
Definition: record_set.h:425
void reset_record_buffer_ct()
The set the number of active records in record buffer to 0.
Definition: record_set.cc:662
The data structure representing the cover relation graph of a poset.
bool is_done() const
True if iteration finished.
bool record_buffer_is_full() const
True if there are no inactive records in the buffer.
Definition: record_set.cc:705
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
abstract_poset_member & top()
The top member of the poset (mutable version)
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
Definition: scoped_index.h:672
An abstract iterator over the ids of an id space.
std::string data_set_alias(const std::string &xname) const
The data set alias for a poset with name xname.
Definition: record_set.cc:340
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 packet...
implicit_crg_interval * implicit_member(pod_index_type xid) const
The implicit interval for the member with index xid. Returns null, if no implicit interval exists...
pod_type pod() const
The current id in the iteration.
void read_record(const record_index &xext_id)
Read and internalizes all the records.
virtual bool invariant() const
Class invariant.
virtual ~member_record_set()
Destructor.
A client handle for a general, abstract partially order set.
int record_buffer_ct() const
The number of active records in record buffer.
Definition: record_set.cc:635
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...
Definition: record_set.cc:764
const scoped_index & index() const
The current item in the subset.
void explicit_down_set_members(const implicit_crg_interval &xinterval, std::set< pod_index_type > &result) const
The explicit members in the downset of the interval xinterval.
void internalize(hvl_t *xhdf_buffer, interval_index_space_handle &xid_space)
Converts the record from external to internal form.
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
Definition: subposet.cc:955
STL namespace.
int _record_buffer_ub
The maximum number of records the buffer can hold.
Definition: record_set.h:441
bool record_buffer_is_empty() const
True if there are no active records in the buffer.
Definition: record_set.cc:695
bool is_open() const
True if this record_set is open.
Definition: record_set.cc:567
const member_record & record() const
The current member record.
pod_index_type begin() const
The beginning of the member interval; this emulates members in the interval [begin(), end()), includes interval member.
void new_equivalence_iterator()
Create the equivalence iterator.
virtual void next()=0
Makes id() the next id in the iteration.
void clear_cover(bool xlower)
Clears the lower (xlower true) or upper (xlower false) cover set of this.
abstract_poset_member & bottom()
The bottom member of the poset (mutable version)
dof_tuple_record_set & dof_tuple_records()
The dof tuple record set associated with this.
implicit_crg_interval * interval() const
The implicit interval object for the current member, if any.
const hub_index_space_handle & hub_id_space() const
The hub id space.
virtual index_space_iterator & get_iterator() const
Allocates an id space iterator from the iterator pool.
hid_t int_data_type_hdf_id()
The HDF internal data type id for this record set.
Definition: record_set.cc:989
virtual hid_t create_dataset()
Creates the HDF dataset associated with this.
std::string alias() const
The standard alias for this data set.
Definition: record_set.cc:247
Abstract implementation of crg_interval for an interval of implicit cover relation graph members...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
void next()
Makes item the next member of the subset.
const scoped_index & index() const
The index of the current member of the iteration.
void write_selection()
Write the records specified by the selection into the file.
hid_t _hdf_id
The HDF id for this record set.
Definition: record_set.h:405
pod_type interval_begin(const scoped_index &xid) const
The beginning of the interval containing xid.hub_pod(). synonym for internval_begin(xid.hub_pod()).
Abstract base class with useful features for all objects.
Definition: any.h:39
std::string _alias
The standard alias for this record_set.
Definition: record_set.h:395
A record_set containing records of type member_record.
hid_t _ext_data_type_hdf_id
The HDF external data type id for this record set.
Definition: record_set.h:415
A record buffer for transferring member data between the kernel and the i/o subsystem.
Definition: member_record.h:54
const bool NOT_STRICT
Iteration strictness control.
Definition: sheaf.h:102
const bool DOWN
Iteration directions.
Definition: sheaf.h:77
virtual member_record_set * clone() const
Virtual constructor; makes a new instance of the same type as this.
bool is_done() const
True if iteration is finished.
hid_t _int_data_type_hdf_id
The HDF internal data type id for this record set.
Definition: record_set.h:452
pod_index_type end() const
The end of the member interval.
void insert_interval(pod_type xbegin, pod_type xend, const scoped_index &xhub_begin, const scoped_index &xhub_end)
Make the closed interval [xbegin, xend] equivalent to [xbegin.hub_pod(), xhub_end.hub_pod()]. synonym for insert_interval(xbegin, xend, xhub_begin.hub_pod(), xhub_end.hub_pod()).
bool is_open() const
True if this file is open.
Definition: sheaf_file.cc:306
size_type external_size(const scoped_index &xmbr_id)
The size of the member record in external form.
void externalize(const scoped_index &xmbr_id, hvl_t *xhdf_buffer)
Converts the record from internal to external form.
std::string name() const
Name of this space.
std::string _name
The name of this record_set.
Definition: record_set.h:390
void initialize_dof_tuple_id_space()
Initializes dof_tuple_id_space().
hid_t hdf_id()
The HDF id for this record set.
Definition: record_set.cc:929
pod_index_type interval_member() const
The index of the interval member itself; synonym for begin().
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
int record_buffer_ub() const
The maximum number of records the buffer can hold.
Definition: record_set.cc:685
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
virtual void insert_member(pod_index_type xmbr_hub_id)
Inserts the member of host() with hub id xmbr_hub_id.
Definition: subposet.cc:1091
An abstract, indexed collection of records on secondary storage.
Definition: record_set.h:150
std::string data_set_name(const std::string &xname) const
The data set name for a poset with name xname.
Definition: record_set.cc:308
void internalize(pod_index_type xmax_row_int_id)
Internalize the members of scafold().structure() from disk.
virtual void create_int_data_type()
Creates a new HDF internal data type.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
const bool UPPER
Selector for upper cover.
Definition: sheaf.h:72
void insert(pod_type xid, const scoped_index &xhub_id)
Make id xid in this id space equivalent to xhub_id in the hub id space. synonym for insert(xid...
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
poset_scaffold & scaffold()
Scaffold for constructing poset associated with this record set (mutable version).
Definition: record_set.cc:416
virtual std::string name() const
The name of this poset.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
virtual const scoped_index & hub_id() const
A id in the hub id space for components of this type; intended for copying to initialize ids to the h...
abstract_poset_member * clone(bool xnew_state, bool xauto_access=true) const
Virtual constructor; makes a new handle of the same type as this, attached to a new state (xnew_state...
A record_set which contains dof tuple records. Supports both record selection and record restriction ...
poset_state_handle & structure()
The handle for the poset being transferred. (Name chosen to void name conflict with class poset...
void externalize(hvl_t *xhdf_buffer, const interval_index_space_handle &xid_space)
Converts the record from internal to external form.
void delete_space(pod_type xid)
Delete the id space with index xid.
member_index_space_type & member_id_space()
External to internal member index space for structure() (mutable version).
Iterates over the subset of Zn defined by the characteristic function host().
virtual void detach_from_state()
Detach this handle from its state, if any.
std::string name() const
The name of this data set.
Definition: record_set.cc:224
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space; synonym for unglued_hub...
void next()
Makes this the next member of the subset.
poset_crg_state & crg() const
The cover relation graph.
void inc_record_buffer_ct()
The increment the number of active records in record buffer.
Definition: record_set.cc:643
const sheaf_file & file() const
The file this record_set belongs to.
Definition: record_set.cc:213
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
bool is_done() const
True if iteration finished.
poset_data_type_map & type_map()
Data type map for records in this record set (mutable version)
Definition: record_set.cc:432
void externalize(pod_index_type xmax_row_int_id)
Externalize the members of scafold().structure() to disk.
virtual pod_type end() const
Ending id of this space.
A poset specific collection of data converters, various buffers and other data used while transferrin...
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
virtual void release_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
void make_internal_dataspace()
Create the internal dataspace.
virtual void get_read_access() const
Get read access to the state associated with this.
An abstract client handle for a member of a poset.
subposet & resident()
The resident subposet for structure() (mutable version).
void read_selection()
Read the records specified by the selection into the record buffer.
index_iterator member_iterator() const
void internalize(hvl_t *xhdf_buffer, const scoped_index &xmbr_id)
Converts the record from external to internal form.
void clean_cover(bool xlower, pod_index_type xmbr_index)
Removes members of the cover that are no longer members of the crg.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
Definition: pod_types.cc:37
void truncate()
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descen...
hid_t _ext_dataspace_hdf_id
The HDF id for the external dataspace of this record set.
Definition: record_set.h:410
virtual const std::string & suffix() const
The name suffix for this data set.
Specialization of the filtered depth-first iterator which exposes the PREVISIT_ACTION to the client...
Definition: preorder_itr.h:41
static pod_index_type first_member_record()
The first record used for members; the record following the id space records.
int _record_buffer_ct
The number of active records in record buffer.
Definition: record_set.h:436
static interval_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent, bool xmerge_mode)
Create a new interval id space in the id space family xid_space with name xname, persistence xis_pers...
hid_t _int_dataspace_hdf_id
The hdf5 id of the dataspace associated with the record buffer.
Definition: record_set.h:447
virtual const scoped_index & member_id(bool xauto_access) const
An id in the member hub id space; intended for copying to initialize ids to the member id space...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
bool is_resident() const
True if and only if member represented by this record is fully resident after read.
void print_map_rep(std::ostream &xos) const
Inserts the map representation into ostream xos.