12 #ifndef __SERIALIZABLE_FILE_H__
13 #define __SERIALIZABLE_FILE_H__
22 template <
class T>
struct SGSparseVectorEntry;
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 virtual bool read_scalar_wrapped(
38 virtual bool read_cont_begin_wrapped(
41 virtual bool read_cont_end_wrapped(
45 virtual bool read_string_begin_wrapped(
47 virtual bool read_string_end_wrapped(
50 virtual bool read_stringentry_begin_wrapped(
52 virtual bool read_stringentry_end_wrapped(
55 virtual bool read_sparse_begin_wrapped(
57 virtual bool read_sparse_end_wrapped(
60 virtual bool read_sparseentry_begin_wrapped(
63 virtual bool read_sparseentry_end_wrapped(
67 virtual bool read_item_begin_wrapped(
69 virtual bool read_item_end_wrapped(
72 virtual bool read_sgserializable_begin_wrapped(
74 EPrimitiveType*
generic) = 0;
75 virtual bool read_sgserializable_end_wrapped(
76 const TSGDataType* type,
const char* sgserializable_name,
77 EPrimitiveType
generic) = 0;
79 virtual bool read_type_begin_wrapped(
81 const char* prefix) = 0;
82 virtual bool read_type_end_wrapped(
84 const char* prefix) = 0;
96 bool is_task_warn(
char rw,
const char* name,
const char* prefix);
97 bool false_warn(
const char* prefix,
const char* name);
112 void init(FILE* fstream,
char task,
const char* filename);
117 #ifndef DOXYGEN_SHOULD_SKIP_THIS
119 char* dest_version,
size_t n) = 0;
121 virtual bool write_scalar_wrapped(
124 virtual bool write_cont_begin_wrapped(
127 virtual bool write_cont_end_wrapped(
131 virtual bool write_string_begin_wrapped(
133 virtual bool write_string_end_wrapped(
136 virtual bool write_stringentry_begin_wrapped(
138 virtual bool write_stringentry_end_wrapped(
141 virtual bool write_sparse_begin_wrapped(
143 virtual bool write_sparse_end_wrapped(
146 virtual bool write_sparseentry_begin_wrapped(
149 virtual bool write_sparseentry_end_wrapped(
153 virtual bool write_item_begin_wrapped(
155 virtual bool write_item_end_wrapped(
158 virtual bool write_sgserializable_begin_wrapped(
159 const TSGDataType* type,
const char* sgserializable_name,
160 EPrimitiveType
generic) = 0;
161 virtual bool write_sgserializable_end_wrapped(
162 const TSGDataType* type,
const char* sgserializable_name,
163 EPrimitiveType
generic) = 0;
165 virtual bool write_type_begin_wrapped(
167 const char* prefix) = 0;
168 virtual bool write_type_end_wrapped(
170 const char* prefix) = 0;
198 virtual void close();
206 #ifndef DOXYGEN_SHOULD_SKIP_THIS
207 virtual bool write_scalar(
208 const TSGDataType* type,
const char* name,
const char* prefix,
210 virtual bool read_scalar(
211 const TSGDataType* type,
const char* name,
const char* prefix,
214 virtual bool write_cont_begin(
215 const TSGDataType* type,
const char* name,
const char* prefix,
217 virtual bool read_cont_begin(
218 const TSGDataType* type,
const char* name,
const char* prefix,
221 virtual bool write_cont_end(
222 const TSGDataType* type,
const char* name,
const char* prefix,
224 virtual bool read_cont_end(
225 const TSGDataType* type,
const char* name,
const char* prefix,
228 virtual bool write_string_begin(
229 const TSGDataType* type,
const char* name,
const char* prefix,
231 virtual bool read_string_begin(
232 const TSGDataType* type,
const char* name,
const char* prefix,
235 virtual bool write_string_end(
236 const TSGDataType* type,
const char* name,
const char* prefix,
238 virtual bool read_string_end(
239 const TSGDataType* type,
const char* name,
const char* prefix,
242 virtual bool write_stringentry_begin(
243 const TSGDataType* type,
const char* name,
const char* prefix,
245 virtual bool read_stringentry_begin(
246 const TSGDataType* type,
const char* name,
const char* prefix,
249 virtual bool write_stringentry_end(
250 const TSGDataType* type,
const char* name,
const char* prefix,
252 virtual bool read_stringentry_end(
253 const TSGDataType* type,
const char* name,
const char* prefix,
256 virtual bool write_sparse_begin(
257 const TSGDataType* type,
const char* name,
const char* prefix,
259 virtual bool read_sparse_begin(
260 const TSGDataType* type,
const char* name,
const char* prefix,
263 virtual bool write_sparse_end(
264 const TSGDataType* type,
const char* name,
const char* prefix,
266 virtual bool read_sparse_end(
267 const TSGDataType* type,
const char* name,
const char* prefix,
270 virtual bool write_sparseentry_begin(
271 const TSGDataType* type,
const char* name,
const char* prefix,
274 virtual bool read_sparseentry_begin(
275 const TSGDataType* type,
const char* name,
const char* prefix,
279 virtual bool write_sparseentry_end(
280 const TSGDataType* type,
const char* name,
const char* prefix,
283 virtual bool read_sparseentry_end(
284 const TSGDataType* type,
const char* name,
const char* prefix,
288 virtual bool write_item_begin(
289 const TSGDataType* type,
const char* name,
const char* prefix,
291 virtual bool read_item_begin(
292 const TSGDataType* type,
const char* name,
const char* prefix,
295 virtual bool write_item_end(
296 const TSGDataType* type,
const char* name,
const char* prefix,
298 virtual bool read_item_end(
299 const TSGDataType* type,
const char* name,
const char* prefix,
302 virtual bool write_sgserializable_begin(
303 const TSGDataType* type,
const char* name,
const char* prefix,
304 const char* sgserializable_name, EPrimitiveType
generic);
305 virtual bool read_sgserializable_begin(
306 const TSGDataType* type,
const char* name,
const char* prefix,
307 char* sgserializable_name, EPrimitiveType*
generic);
309 virtual bool write_sgserializable_end(
310 const TSGDataType* type,
const char* name,
const char* prefix,
311 const char* sgserializable_name, EPrimitiveType
generic);
312 virtual bool read_sgserializable_end(
313 const TSGDataType* type,
const char* name,
const char* prefix,
314 const char* sgserializable_name, EPrimitiveType
generic);
316 virtual bool write_type_begin(
317 const TSGDataType* type,
const char* name,
const char* prefix);
318 virtual bool read_type_begin(
319 const TSGDataType* type,
const char* name,
const char* prefix);
321 virtual bool write_type_end(
322 const TSGDataType* type,
const char* name,
const char* prefix);
323 virtual bool read_type_end(
324 const TSGDataType* type,
const char* name,
const char* prefix);
330 #endif // __SERIALIZABLE_FILE_H__
virtual ~CSerializableFile()
Datatypes that shogun supports.
Class SGObject is the base class of all shogun objects.
all of classes and functions are contained in the shogun namespace
template class SGSparseVectorEntry
void init(FILE *fstream, char task, const char *filename)