12 #ifndef __SERIALIZABLE_FILE_H__
13 #define __SERIALIZABLE_FILE_H__
23 template <
class T>
struct SGSparseVectorEntry;
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 virtual bool read_scalar_wrapped(
39 virtual bool read_cont_begin_wrapped(
42 virtual bool read_cont_end_wrapped(
46 virtual bool read_string_begin_wrapped(
48 virtual bool read_string_end_wrapped(
51 virtual bool read_stringentry_begin_wrapped(
53 virtual bool read_stringentry_end_wrapped(
56 virtual bool read_sparse_begin_wrapped(
58 virtual bool read_sparse_end_wrapped(
61 virtual bool read_sparseentry_begin_wrapped(
64 virtual bool read_sparseentry_end_wrapped(
68 virtual bool read_item_begin_wrapped(
70 virtual bool read_item_end_wrapped(
73 virtual bool read_sgserializable_begin_wrapped(
75 EPrimitiveType*
generic) = 0;
76 virtual bool read_sgserializable_end_wrapped(
77 const TSGDataType* type,
const char* sgserializable_name,
78 EPrimitiveType
generic) = 0;
80 virtual bool read_type_begin_wrapped(
82 const char* prefix) = 0;
83 virtual bool read_type_end_wrapped(
85 const char* prefix) = 0;
97 bool is_task_warn(
char rw,
const char* name,
const char* prefix);
98 bool false_warn(
const char* prefix,
const char* name);
113 void init(FILE* fstream,
char task,
const char* filename);
118 #ifndef DOXYGEN_SHOULD_SKIP_THIS
120 char* dest_version,
size_t n) = 0;
122 virtual bool write_scalar_wrapped(
125 virtual bool write_cont_begin_wrapped(
128 virtual bool write_cont_end_wrapped(
132 virtual bool write_string_begin_wrapped(
134 virtual bool write_string_end_wrapped(
137 virtual bool write_stringentry_begin_wrapped(
139 virtual bool write_stringentry_end_wrapped(
142 virtual bool write_sparse_begin_wrapped(
144 virtual bool write_sparse_end_wrapped(
147 virtual bool write_sparseentry_begin_wrapped(
150 virtual bool write_sparseentry_end_wrapped(
154 virtual bool write_item_begin_wrapped(
156 virtual bool write_item_end_wrapped(
159 virtual bool write_sgserializable_begin_wrapped(
160 const TSGDataType* type,
const char* sgserializable_name,
161 EPrimitiveType
generic) = 0;
162 virtual bool write_sgserializable_end_wrapped(
163 const TSGDataType* type,
const char* sgserializable_name,
164 EPrimitiveType
generic) = 0;
166 virtual bool write_type_begin_wrapped(
168 const char* prefix) = 0;
169 virtual bool write_type_end_wrapped(
171 const char* prefix) = 0;
199 virtual void close();
207 #ifndef DOXYGEN_SHOULD_SKIP_THIS
208 virtual bool write_scalar(
209 const TSGDataType* type,
const char* name,
const char* prefix,
211 virtual bool read_scalar(
212 const TSGDataType* type,
const char* name,
const char* prefix,
215 virtual bool write_cont_begin(
216 const TSGDataType* type,
const char* name,
const char* prefix,
218 virtual bool read_cont_begin(
219 const TSGDataType* type,
const char* name,
const char* prefix,
222 virtual bool write_cont_end(
223 const TSGDataType* type,
const char* name,
const char* prefix,
225 virtual bool read_cont_end(
226 const TSGDataType* type,
const char* name,
const char* prefix,
229 virtual bool write_string_begin(
230 const TSGDataType* type,
const char* name,
const char* prefix,
232 virtual bool read_string_begin(
233 const TSGDataType* type,
const char* name,
const char* prefix,
236 virtual bool write_string_end(
237 const TSGDataType* type,
const char* name,
const char* prefix,
239 virtual bool read_string_end(
240 const TSGDataType* type,
const char* name,
const char* prefix,
243 virtual bool write_stringentry_begin(
244 const TSGDataType* type,
const char* name,
const char* prefix,
246 virtual bool read_stringentry_begin(
247 const TSGDataType* type,
const char* name,
const char* prefix,
250 virtual bool write_stringentry_end(
251 const TSGDataType* type,
const char* name,
const char* prefix,
253 virtual bool read_stringentry_end(
254 const TSGDataType* type,
const char* name,
const char* prefix,
257 virtual bool write_sparse_begin(
258 const TSGDataType* type,
const char* name,
const char* prefix,
260 virtual bool read_sparse_begin(
261 const TSGDataType* type,
const char* name,
const char* prefix,
264 virtual bool write_sparse_end(
265 const TSGDataType* type,
const char* name,
const char* prefix,
267 virtual bool read_sparse_end(
268 const TSGDataType* type,
const char* name,
const char* prefix,
271 virtual bool write_sparseentry_begin(
272 const TSGDataType* type,
const char* name,
const char* prefix,
275 virtual bool read_sparseentry_begin(
276 const TSGDataType* type,
const char* name,
const char* prefix,
280 virtual bool write_sparseentry_end(
281 const TSGDataType* type,
const char* name,
const char* prefix,
284 virtual bool read_sparseentry_end(
285 const TSGDataType* type,
const char* name,
const char* prefix,
289 virtual bool write_item_begin(
290 const TSGDataType* type,
const char* name,
const char* prefix,
292 virtual bool read_item_begin(
293 const TSGDataType* type,
const char* name,
const char* prefix,
296 virtual bool write_item_end(
297 const TSGDataType* type,
const char* name,
const char* prefix,
299 virtual bool read_item_end(
300 const TSGDataType* type,
const char* name,
const char* prefix,
303 virtual bool write_sgserializable_begin(
304 const TSGDataType* type,
const char* name,
const char* prefix,
305 const char* sgserializable_name, EPrimitiveType
generic);
306 virtual bool read_sgserializable_begin(
307 const TSGDataType* type,
const char* name,
const char* prefix,
308 char* sgserializable_name, EPrimitiveType*
generic);
310 virtual bool write_sgserializable_end(
311 const TSGDataType* type,
const char* name,
const char* prefix,
312 const char* sgserializable_name, EPrimitiveType
generic);
313 virtual bool read_sgserializable_end(
314 const TSGDataType* type,
const char* name,
const char* prefix,
315 const char* sgserializable_name, EPrimitiveType
generic);
317 virtual bool write_type_begin(
318 const TSGDataType* type,
const char* name,
const char* prefix);
319 virtual bool read_type_begin(
320 const TSGDataType* type,
const char* name,
const char* prefix);
322 virtual bool write_type_end(
323 const TSGDataType* type,
const char* name,
const char* prefix);
324 virtual bool read_type_end(
325 const TSGDataType* type,
const char* name,
const char* prefix);
331 #endif // __SERIALIZABLE_FILE_H__
virtual ~CSerializableFile()
Datatypes that shogun supports.
Class SGObject is the base class of all shogun objects.
template class SGSparseVectorEntry
void init(FILE *fstream, char task, const char *filename)