Version 3.3.1.2

EasyBaseFormatter<T> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public abstract class EasyBaseFormatter<T> : BaseFormatter<T>, IFormatter<T>, IFormatter
Provides an easy way of implementing custom formatters.
Inheritance

Type Parameters

T

The type which can be serialized and deserialized by the formatter.

Constructors

EasyBaseFormatter()
protected EasyBaseFormatter()

Methods

DeserializeImplementation(ref T, IDataReader)
Reads through all entries in the current node one at a time, and calls for each entry.
protected override sealed void DeserializeImplementation(ref T value, IDataReader reader)
Parameters
T value

The uninitialized value to serialize into. This value will have been created earlier using GetUninitializedObject().

Sirenix.Serialization.IDataReader reader

The reader to deserialize with.

ReadDataEntry(ref T, String, EntryType, IDataReader)
Reads a data entry into the value denoted by the entry name.
protected abstract void ReadDataEntry(ref T value, string entryName, EntryType entryType, IDataReader reader)
Parameters
T value

The value to read into.

System.String entryName

The name of the entry.

EntryType entryType

The type of the entry.

Sirenix.Serialization.IDataReader reader

The reader currently used for deserialization.

SerializeImplementation(ref T, IDataWriter)
protected override sealed void SerializeImplementation(ref T value, IDataWriter writer)
Parameters
T value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.

WriteDataEntries(ref T, IDataWriter)
Write the serialized values of a value of type .
protected abstract void WriteDataEntries(ref T value, IDataWriter writer)
Parameters
T value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer currently used for serialization.