SheafSystem  0.0.0.0
map_record.h
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 // Interface for class map_record
19 
20 #ifndef MAP_RECORD_H
21 #define MAP_RECORD_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef VARIABLE_LENGTH_RECORD_H
28 #include "SheafSystem/variable_length_record.h"
29 #endif
30 
31 namespace sheaf
32 {
33 
34 class member_record_set;
35 class interval_index_map;
36 
43 class SHEAF_DLL_SPEC map_record : public variable_length_record
44 {
45  // ===========================================================
46  // MAP_RECORD FACET
47  // ===========================================================
48 
49 public:
50 
56 
60  map_record(const map_record& xother);
61 
65  virtual ~map_record();
66 
67 protected:
68 
69  // Default constructor.
70  // Default construction prohibited because scaffold must be initialized
71  // inline map_record() {} ;
72 
73 private:
74 
75  // ===========================================================
76  // WRITE FACET
77  // ===========================================================
78 
79 public:
80 
84  void externalize(hvl_t* xhdf_buffer, const interval_index_map& xmap);
85 
86 private:
87 
91  void transfer_map_to_internal_buffer();
92 
97  void convert_internal_buffer_to_external_buffer(const interval_index_map& xmap);
98 
102  virtual void initialize_external_buffer(const interval_index_map& xmap);
103 
107  void externalize_map_data(size_t& xnext_field_offset, const interval_index_map& xmap);
108 
112  void transfer_external_buffer_to_HDF(hvl_t* xbuf);
113 
114  // ===========================================================
115  // READ FACET
116  // ===========================================================
117 
118 public:
119 
123  void internalize(hvl_t* xhdf_buffer, interval_index_map& xmap);
124 
125 private:
126 
130  void transfer_HDF_to_external_buffer(hvl_t* xbuf);
131 
136  void convert_external_buffer_to_internal_buffer(interval_index_map& xmap);
137 
141  void internalize_map_data(size_t& xnext_field_offset, interval_index_map& xmap);
142 
146  void transfer_internal_buffer_to_map();
147 
148  // ===========================================================
149  // VARIABLE_LENGTH_RECORD FACET
150  // ===========================================================
151 
152 
153 
157  inline int* int_buf() const
158  {
159  return reinterpret_cast<pod_index_type*>(buf());
160  };
161 
162  // ===========================================================
163  // RECORD FACET
164  // ===========================================================
165 
166  // ===========================================================
167  // ANY FACET
168  // ===========================================================
169 
170 public:
171 
177  virtual map_record* clone() const;
178 
182  virtual bool invariant() const;
183 
187  virtual bool is_ancestor_of(const any* other) const;
188 
189 };
190 
191 } // namespace sheaf
192 
193 #endif // ifndef MAP_RECORD_H
194 
195 
196 
197 
198 
199 
The general variable length record wrapper/adapter for transferring data between the kernel and the i...
Abstract base class with useful features for all objects.
Definition: any.h:39
A record_set containing records of type member_record.
A record buffer for transferring file id map data for the member record data set between the kernel a...
Definition: map_record.h:43
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.