| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
QC_Serializable.dox.h
1
3 namespace Qore {
5
8 struct SerializationInfo {
10 auto _data;
12 *hash<string, hash<auto>> _index;
14 *list<string> _modules;
16 *hash<string, hash<auto>> _sdata;
17};
18}
19
21 namespace Qore {
23
26 struct ObjectSerializationInfo {
28 string _class;
30 *hash<string, hash<string, auto>> _class_data;
31};
32}
33
35 namespace Qore {
37
40 struct IndexedObjectSerializationInfo {
42 string _index;
44 string _weak;
45};
46}
47
49 namespace Qore {
51
54 struct HashSerializationInfo {
56 string _hash;
58 *hash<string, auto> _members;
59};
60}
61
63 namespace Qore {
65
68 struct ListSerializationInfo {
70 *list<auto> _elements;
72 string _list;
73};
74}
75
77 namespace Qore {
79
100 class Serializable {
101
102 public:
104/***/
105 constructor();
106
107 public:
109/***/
110 copy();
111
112 private:
114
152nothing deserializeMembers(hash<auto> members);
153
154 public:
156
172 serialize(OutputStream stream, *int flags);
173
174 public:
176
193 binary serialize(*int flags);
194
195 private:
197
239*hash<auto> serializeMembers(*hash<auto> members);
240
241 public:
243
263 hash<SerializationInfo> serializeToData(*int flags);
264
265 public:
267
283 static auto deserialize(InputStream stream, *int flags);
284
285 public:
287
302 static auto deserialize(binary bin, *int flags);
303
304 public:
306
324 static auto deserialize(string bin, *int flags);
325
326 public:
328
344 static auto deserialize(hash<SerializationInfo> data, *int flags);
345
346 public:
348
364 static hash<SerializationInfo> deserializeToData(InputStream stream, *int flags);
365
366 public:
368
384 static hash<SerializationInfo> deserializeToData(binary bin, *int flags);
385
386 public:
388
405 static serialize(auto val, OutputStream stream, *int flags);
406
407 public:
409
427 static binary serialize(auto val, *int flags);
428
429 public:
431
452 static hash<SerializationInfo> serializeToData(auto val, *int flags);
453};
454
459
461 const QSF_INCLUDE_STATIC_CLASS_VARS = QSF_INCLUDE_STATIC_CLASS_VARS;
463
468
470 const QDF_MERGE_STATIC_CLASS_VARS = QDF_MERGE_STATIC_CLASS_VARS;
472 const QDF_STATIC_CLASS_VARS = QDF_STATIC_CLASS_VARS;
474}
Qore::InputStream
This class defines an abstract interface for input streams.
Definition QC_InputStream.dox.h:19
Qore::OutputStream
This class defines an abstract interface for output streams.
Definition QC_OutputStream.dox.h:18
Qore::Serializable
The Serializable class can be used to mark a class as being serializable.
Definition QC_Serializable.dox.h:100
Qore::Serializable::copy
copy()
The copy constructor does not perform any action; this class is just used to mark a class as serializ...
Qore::Serializable::serialize
binary serialize(*int flags)
converts the object to binary data representing the object
Qore::Serializable::deserialize
static auto deserialize(string bin, *int flags)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::deserialize
static auto deserialize(InputStream stream, *int flags)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::deserialize
static auto deserialize(binary bin, *int flags)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::deserialize
static auto deserialize(hash< SerializationInfo > data, *int flags)
Deserializes data produced with serializeToData() and returns the value represented by the data.
Qore::Serializable::constructor
constructor()
The constructor does not perform any action; this class is just used to mark a class as serializable ...
Qore::Serializable::deserializeMembers
nothing deserializeMembers(hash< auto > members)
overrides the default automatic member assignment logic for user classes during data deserialization
Qore::Serializable::serialize
serialize(OutputStream stream, *int flags)
converts the object to binary data representing the object
Qore::Serializable::deserializeToData
static hash< SerializationInfo > deserializeToData(binary bin, *int flags)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::serialize
static binary serialize(auto val, *int flags)
serializes the data and returns the serialized data as a binary object
Qore::Serializable::serializeMembers
*hash< auto > serializeMembers(*hash< auto > members)
overrides the default automatic member retrieval for user classes during data serialization
Qore::Serializable::serializeToData
hash< SerializationInfo > serializeToData(*int flags)
converts the object to a serialization hash representing the object
Qore::Serializable::deserializeToData
static hash< SerializationInfo > deserializeToData(InputStream stream, *int flags)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::serializeToData
static hash< SerializationInfo > serializeToData(auto val, *int flags)
converts the value to a serialization hash representing the value
Qore::Serializable::serialize
static serialize(auto val, OutputStream stream, *int flags)
serializes the data and writes the serialized data to the given output stream
Qore::QDF_MERGE_STATIC_CLASS_VARS
const QDF_MERGE_STATIC_CLASS_VARS
Deserialize static class vars and merge hashes; implies QDF_STATIC_CLASS_VARS.
Definition QC_Serializable.dox.h:470
Qore::QDF_STATIC_CLASS_VARS
const QDF_STATIC_CLASS_VARS
Deserialize static class vars.
Definition QC_Serializable.dox.h:472
Qore::QSF_INCLUDE_STATIC_CLASS_VARS
const QSF_INCLUDE_STATIC_CLASS_VARS
Serialize static class vars of classes serialized.
Definition QC_Serializable.dox.h:461
Qore::hash
hash< auto > hash(object obj)
Returns a hash of an object's members.
Qore::list
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3
Qore::HashSerializationInfo
hash serialization information for typed hashes or untyped hashes
Definition QC_Serializable.dox.h:54
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:56
Qore::HashSerializationInfo::_members
*hash< string, auto > _members
member values
Definition QC_Serializable.dox.h:58
Qore::IndexedObjectSerializationInfo
object serialization information for an indexed object
Definition QC_Serializable.dox.h:40
Qore::IndexedObjectSerializationInfo::_index
string _index
index value
Definition QC_Serializable.dox.h:42
Qore::IndexedObjectSerializationInfo::_weak
string _weak
index value that returns a weak reference
Definition QC_Serializable.dox.h:44
Qore::ListSerializationInfo
list serialization information
Definition QC_Serializable.dox.h:68
Qore::ListSerializationInfo::_list
string _list
the complex list element type info
Definition QC_Serializable.dox.h:72
Qore::ListSerializationInfo::_elements
*list< auto > _elements
the data-serialized list elements
Definition QC_Serializable.dox.h:70
Qore::ObjectSerializationInfo
object serialization information
Definition QC_Serializable.dox.h:26
Qore::ObjectSerializationInfo::_class_data
*hash< string, hash< string, auto > > _class_data
member values per class; class path -> member hash
Definition QC_Serializable.dox.h:30
Qore::ObjectSerializationInfo::_class
string _class
class path name
Definition QC_Serializable.dox.h:28
Qore::SerializationInfo
serialization information
Definition QC_Serializable.dox.h:8
Qore::SerializationInfo::_index
*hash< string, hash< auto > > _index
Unique object index.
Definition QC_Serializable.dox.h:12
Qore::SerializationInfo::_modules
*list< string > _modules
List of modules to load to support the data.
Definition QC_Serializable.dox.h:14
Qore::SerializationInfo::_data
auto _data
Serialized data.
Definition QC_Serializable.dox.h:10
Qore::SerializationInfo::_sdata
*hash< string, hash< auto > > _sdata
Serialized static class data.
Definition QC_Serializable.dox.h:16