Qore Programming Language 2.0.0
Loading...
Searching...
No Matches
QoreSerializationContext Class Reference

serialization context object used in builtin serializer methods More...

#include <common.h>

Public Member Methods

DLLEXPORT void addModule (const char *module)
 Adds a module to be loaded when the data is deserialized.
 
DLLEXPORT int64 getFlags () const
 Returns the current serialization flag bitfield.
 
DLLEXPORT int serializeHash (const QoreHashNode &h, std::string &index, ExceptionSink *xsink)
 Serializes the given hash and returns the serialization index.
 
DLLEXPORT int serializeList (const QoreListNode &l, std::string &index, ExceptionSink *xsink)
 Serializes the given list and returns the serialization index.
 
DLLEXPORT int serializeObject (const QoreObject &obj, std::string &index, ExceptionSink *xsink)
 Serializes the given object and returns the serialization index.
 
DLLEXPORT QoreValue serializeValue (const QoreValue val, ExceptionSink *xsink)
 Serializes the given value and returns a serialized value representing the value to be serialized.
 

Detailed Description

serialization context object used in builtin serializer methods

Since
Qore 0.9

Member Function Documentation

◆ serializeHash()

DLLEXPORT int QoreSerializationContext::serializeHash ( const QoreHashNode h,
std::string &  index,
ExceptionSink xsink 
)

Serializes the given hash and returns the serialization index.

Throws a Qore-language exception if there is an error serializing the hash

Note
When serializing weak references to hashes, a strong reference to the hash must also be serialized in the same operation, or any weak references will be invalid after deserialization

◆ serializeList()

DLLEXPORT int QoreSerializationContext::serializeList ( const QoreListNode l,
std::string &  index,
ExceptionSink xsink 
)

Serializes the given list and returns the serialization index.

Throws a Qore-language exception if there is an error serializing the list

Note
When serializing weak references to lists, a strong reference to the list must also be serialized in the same operation, or any weak references will be invalid after deserialization

◆ serializeObject()

DLLEXPORT int QoreSerializationContext::serializeObject ( const QoreObject obj,
std::string &  index,
ExceptionSink xsink 
)

Serializes the given object and returns the serialization index.

Throws a Qore-language exception if there is an error serializing the object

Note
When serializing weak references to objects, a strong reference to the object must also be serialized in the same operation, or any weak references will be invalid after deserialization

◆ serializeValue()

DLLEXPORT QoreValue QoreSerializationContext::serializeValue ( const QoreValue  val,
ExceptionSink xsink 
)

Serializes the given value and returns a serialized value representing the value to be serialized.

throws a Qore-language exception if there is an error serializing the object


The documentation for this class was generated from the following file: