QC_Serializable.dox.h
namespace Qore {
struct SerializationInfo {
auto _data;
*hash<string, hash<ObjectSerializationInfo>> _index;
*list<string> _modules;
};
}
namespace Qore {
struct ObjectSerializationInfo {
string _class;
*hash<string, hash<string, auto>> _class_data;
};
}
namespace Qore {
struct IndexedObjectSerializationInfo {
string _index;
};
}
namespace Qore {
struct HashSerializationInfo {
string _hash;
*hash<string, auto> _members;
};
}
namespace Qore {
struct ListSerializationInfo {
*list<auto> _elements;
string _list;
};
}
namespace Qore {
class Serializable {
public:
/***/
constructor();
public:
/***/
copy();
private:
nothing deserializeMembers(hash<auto> members);
public:
serialize(OutputStream stream);
public:
binary serialize();
private:
*hash<auto> serializeMembers(*hash<auto> members);
public:
hash<SerializationInfo> serializeToData();
public:
static auto deserialize(InputStream stream);
public:
static auto deserialize(binary bin);
public:
static auto deserialize(string bin);
public:
static auto deserialize(hash<SerializationInfo> data);
public:
static hash<SerializationInfo> deserializeToData(InputStream stream);
public:
static hash<SerializationInfo> deserializeToData(binary bin);
public:
static serialize(auto val, OutputStream stream);
public:
static binary serialize(auto val);
public:
static hash<SerializationInfo> serializeToData(auto val);
};
}
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:96
Qore::Serializable::deserialize
static auto deserialize(binary bin)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::deserialize
static auto deserialize(InputStream stream)
Deserializes data produced with serialize() and returns the value represented by the data.
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::Serializable::serialize
static serialize(auto val, OutputStream stream)
serializes the data and writes the serialized data to the given output stream
Qore::Serializable::deserialize
static auto deserialize(hash< SerializationInfo > data)
Deserializes data produced with serializeToData() and returns the value represented by the data.
Qore::Serializable::deserializeToData
static hash< SerializationInfo > deserializeToData(binary bin)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::serializeToData
hash< SerializationInfo > serializeToData()
converts the object to a serialization hash representing the object
Qore::Serializable::serialize
serialize(OutputStream stream)
converts the object to binary data representing the object
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::deserialize
static auto deserialize(string bin)
Deserializes data produced with serialize() and returns the value represented by the data.
Qore::Serializable::serialize
static binary serialize(auto val)
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
static hash< SerializationInfo > serializeToData(auto val)
converts the value to a serialization hash representing the value
Qore::Serializable::serialize
binary serialize()
converts the object to binary data representing the object
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:50
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::HashSerializationInfo::_members
*hash< string, auto > _members
member values
Definition: QC_Serializable.dox.h:54
Qore::IndexedObjectSerializationInfo
object serialization information for an indexed object
Definition: QC_Serializable.dox.h:38
Qore::IndexedObjectSerializationInfo::_index
string _index
index value
Definition: QC_Serializable.dox.h:40
Qore::ListSerializationInfo
list serialization information
Definition: QC_Serializable.dox.h:64
Qore::ListSerializationInfo::_list
string _list
the complex list element type info
Definition: QC_Serializable.dox.h:68
Qore::ListSerializationInfo::_elements
*list< auto > _elements
the data-serialized list elements
Definition: QC_Serializable.dox.h:66
Qore::ObjectSerializationInfo
object serialization information
Definition: QC_Serializable.dox.h:24
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::ObjectSerializationInfo::_class
string _class
class path name
Definition: QC_Serializable.dox.h:26
Qore::SerializationInfo
serialization information
Definition: QC_Serializable.dox.h:8
Qore::SerializationInfo::_index
*hash< string, hash< ObjectSerializationInfo > > _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