iz.serializer

The iz serialization system.

Members

Aliases

FormatReader
alias FormatReader = FormatToken function(Stream stream, IstNode istNode)

Prototype of a function that reads an IstNode representation from a Stream.

FormatWriter
alias FormatWriter = void function(IstNode istNode, Stream stream, const FormatToken tok)

Prototype of a function that writes an IstNode representation to a Stream.

WantAggregateEvent
alias WantAggregateEvent = void delegate(IstNode node, ref void* aggregate, out bool fromRefererence)

Prototype of the event called when a serializer fails to get an aggregate to deserialize.

WantDescriptorEvent
alias WantDescriptorEvent = void delegate(IstNode node, ref Ptr descriptor, out bool stop)

Prototype of the event triggered when a serializer misses a property descriptor.

defaultFormat
alias defaultFormat = SerializationFormat.iztxt

The serialization format used when not specified.

Classes

IstNode
class IstNode

IST node

SerializableReference
class SerializableReference

Makes a reference serializable.

Serializer
class Serializer

The Serializer class is specialized to store and restore the members of an Object.

Enums

FormatToken
enum FormatToken

Enumerates the possible token handled by a serialization format

SerializationFormat
enum SerializationFormat

Enumerates the possible serialization format

Functions

fileToPublisher
void fileToPublisher(const(char)[] filename, Object pub, SerializationFormat format = defaultFormat, WantAggregateEvent wae = null, WantDescriptorEvent wde = null)

Deserializes a file to a PropertyPublisher.

isSerializable
bool isSerializable()

Only a subset of the type representable as a Rtti are serializable. This template only evaluates to true if it's the case.

nodeInfo2Declarator
void nodeInfo2Declarator(SerNodeInfo* nodeInfo)

Restores the raw value contained in a SerNodeInfo using the associated setter.

publisherToFile
void publisherToFile(Object pub, const(char)[] filename, SerializationFormat format = defaultFormat, WantAggregateEvent wae = null, WantDescriptorEvent wde = null)

Serializes a PropertyPublisher to a file.

setNodeInfo
void setNodeInfo(SerNodeInfo* nodeInfo, PropDescriptor!T* descriptor)

Fills an SerNodeInfo according to an PropDescriptor

text2value
ubyte[] text2value(char[] text, const SerNodeInfo* nodeInfo)

Converts the literal representation to a ubyte array according to type.

value2text
char[] value2text(SerNodeInfo* nodeInfo)

Converts the raw data contained in a SerNodeInfo to its string representation.

Structs

IstNodeCache
struct IstNodeCache

Stores an IST in an associative array.

SerNodeInfo
struct SerNodeInfo

Represents a serializable property without genericity.

Meta