| Qore Programming Language Reference Manual 1.0.8

QC_Serializable.dox.h
1
3 namespace Qore {
5
8 struct SerializationInfo {
10 auto _data;
12 *hash<string, hash<ObjectSerializationInfo>> _index;
14 *list<string> _modules;
15 };
16 }
17
19 namespace Qore {
21
24 struct ObjectSerializationInfo {
26 string _class;
28 *hash<string, hash<string, auto>> _class_data;
29 };
30 }
31
33 namespace Qore {
35
38 struct IndexedObjectSerializationInfo {
40 string _index;
41 };
42 }
43
45 namespace Qore {
47
50 struct HashSerializationInfo {
52 string _hash;
54 *hash<string, auto> _members;
55 };
56 }
57
59 namespace Qore {
61
64 struct ListSerializationInfo {
66 *list<auto> _elements;
68 string _list;
69 };
70 }
71
73 namespace Qore {
75
96 class Serializable {
97
98 public:
100 /***/
101 constructor();
102
103 public:
105 /***/
106 copy();
107
108 private:
110
148 nothing deserializeMembers(hash<auto> members);
149
150 public:
152
167 serialize(OutputStream stream);
168
169 public:
171
186 binary serialize();
187
188 private:
190
232 *hash<auto> serializeMembers(*hash<auto> members);
233
234 public:
236
254 hash<SerializationInfo> serializeToData();
255
256 public:
258
272 static auto deserialize(InputStream stream);
273
274 public:
276
289 static auto deserialize(binary bin);
290
291 public:
293
309 static auto deserialize(string bin);
310
311 public:
313
327 static auto deserialize(hash<SerializationInfo> data);
328
329 public:
331
345 static hash<SerializationInfo> deserializeToData(InputStream stream);
346
347 public:
349
363 static hash<SerializationInfo> deserializeToData(binary bin);
364
365 public:
367
383 static serialize(auto val, OutputStream stream);
384
385 public:
387
404 static binary serialize(auto val);
405
406 public:
408
428 static hash<SerializationInfo> serializeToData(auto val);
429 };
430 }
Qore::ObjectSerializationInfo::_class_data
*hash< string, hash< string, auto > > _class_data
member values per class; class path -> member hash
Definition: QC_Serializable.dox.h:28
Qore::Serializable::constructor
constructor()
The constructor does not perform any action; this class is just used to mark a class as serializable ...
Qore::Serializable::serializeToData
hash< SerializationInfo > serializeToData()
converts the object to a serialization hash representing the object
Qore::SerializationInfo::_modules
*list< string > _modules
list of modules to load to support the data
Definition: QC_Serializable.dox.h:14
Qore::IndexedObjectSerializationInfo
object serialization information for an indexed object
Definition: QC_Serializable.dox.h:38
Qore::SerializationInfo::_data
auto _data
serialized data
Definition: QC_Serializable.dox.h:10
Qore::ListSerializationInfo
list serialization information
Definition: QC_Serializable.dox.h:64
Qore::ObjectSerializationInfo::_class
string _class
class path name
Definition: QC_Serializable.dox.h:26
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore::Serializable
The Serializable class can be used to mark a class as being serializable.
Definition: QC_Serializable.dox.h:96
Qore::HashSerializationInfo::_hash
string _hash
typed hash path name, if any; otherwise for an untyped hash: "^..." where ... is the complex value ty...
Definition: QC_Serializable.dox.h:52
Qore::Serializable::serializeMembers
*hash< auto > serializeMembers(*hash< auto > members)
overrides the default automatic member retrieval for user classes during data serialization ...
Qore::Serializable::deserializeMembers
nothing deserializeMembers(hash< auto > members)
overrides the default automatic member assignment logic for user classes during data deserialization ...
Qore::SerializationInfo
serialization information
Definition: QC_Serializable.dox.h:8
Qore::HashSerializationInfo
hash serialization information for typed hashes or untyped hashes
Definition: QC_Serializable.dox.h:50
Qore::Serializable::deserialize
static auto deserialize(InputStream stream)
Deserializes data produced with serialize() and returns the value represented by the data...
Qore::ListSerializationInfo::_list
string _list
the complex list element type info
Definition: QC_Serializable.dox.h:68
Qore::OutputStream
This class defines an abstract interface for output streams.
Definition: QC_OutputStream.dox.h:18
Qore::Serializable::deserializeToData
static hash< SerializationInfo > deserializeToData(InputStream stream)
Deserializes data produced with serialize() and returns the value represented by the data...
Qore::Serializable::copy
copy()
The copy constructor does not perform any action; this class is just used to mark a class as serializ...
Qore::IndexedObjectSerializationInfo::_index
string _index
index value
Definition: QC_Serializable.dox.h:40
Qore::ListSerializationInfo::_elements
*list< auto > _elements
the data-serialized list elements
Definition: QC_Serializable.dox.h:66
Qore::Serializable::serialize
binary serialize()
converts the object to binary data representing the object
Qore::ObjectSerializationInfo
object serialization information
Definition: QC_Serializable.dox.h:24
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::InputStream
This class defines an abstract interface for input streams.
Definition: QC_InputStream.dox.h:19
Qore::HashSerializationInfo::_members
*hash< string, auto > _members
member values
Definition: QC_Serializable.dox.h:54
Qore::SerializationInfo::_index
*hash< string, hash< ObjectSerializationInfo > > _index
unique object index
Definition: QC_Serializable.dox.h:12