SheafSystem  0.0.0.0
attributes_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 attributes_record
19 
20 #ifndef ATTRIBUTES_RECORD_H
21 #define ATTRIBUTES_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 #ifndef STD_STRING_H
32 #include "SheafSystem/std_string.h"
33 #endif
34 
35 namespace sheaf
36 {
37 
43 class SHEAF_DLL_SPEC attributes_record : public variable_length_record
44 {
45 public:
46 
50  typedef char* hdf_buf_type;
51 
52 
53  // CANONICAL MEMBERS
54 
59  attributes_record(const attributes_record& xother);
60 
66  virtual attributes_record* clone() const;
67 
71  virtual ~attributes_record();
72 
76  virtual bool invariant() const;
77 
81  virtual bool is_ancestor_of(const any* other) const;
82 
83  // ATTRIBUTES_RECORD INTERFACE
84 
89 
93  void internalize(hdf_buf_type* xhdf_buffer);
94 
98  void externalize(hdf_buf_type* xhdf_buffer);
99 
100 protected:
101 
105  void transfer_HDF_to_external_buffer(hdf_buf_type* xbuf);
106 
110  void transfer_external_buffer_to_HDF(hdf_buf_type* xbuf);
111 
115  virtual void transfer_internal_buffer_to_poset() = 0;
116 
120  virtual void transfer_poset_to_internal_buffer() = 0;
121 
126  void convert_external_buffer_to_internal_buffer();
127 
132  void convert_internal_buffer_to_external_buffer();
133 
137  std::string _str_buf;
138 
139 };
140 
141 } // namespace sheaf
142 
143 
144 #endif // ifndef ATTRIBUTES_RECORD_SET
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
std::string _str_buf
The internal/external buffer.
char * hdf_buf_type
The type of hdf buffer.
Namespace for the sheaves component of the sheaf system.
A poset specific collection of data converters, various buffers and other data used while transferrin...
An abstract wrapper/adapter for attributes records. Intended for transferring data between the kernel...