C# Class TagTool.Serialization.TagSerializer

Serializes classes into tag data by using reflection.
ファイルを表示 Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
Serialize ( ISerializationContext context, object tagStructure, uint offset = null ) : void

Serializes a tag structure into a context.

SerializeMatrix ( IDataBlock block, Matrix4x3 mat ) : void
TagSerializer ( DefinitionSet version ) : System

Constructs a tag serializer for a specific engine version.

Private Methods

Method Description
SerializeComplexValue ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, object val, TagFieldAttribute valueInfo, Type valueType ) : void

Serializes a complex value.

SerializeDataReference ( MemoryStream tagStream, IDataBlock block, byte data, TagFieldAttribute valueInfo ) : void

Serializes a data reference composed of raw bytes.

SerializeEulerAngles ( IDataBlock block, Euler2 angles ) : void
SerializeEulerAngles ( IDataBlock block, Euler3 angles ) : void
SerializeIndirectValue ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, object val, Type valueType ) : void
SerializeInlineArray ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, Array data, TagFieldAttribute valueInfo ) : void

Serializes an inline array.

SerializePrimitiveValue ( BinaryWriter writer, object val, Type valueType ) : void

Serializes a primitive value.

SerializeProperty ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, object instance, TagFieldEnumerator enumerator, long baseOffset ) : void

Serializes a property.

SerializeRange ( IDataBlock block, object val ) : void
SerializeRealQuaternion ( IDataBlock block, RealQuaternion quat ) : void
SerializeString ( BinaryWriter writer, string str, TagFieldAttribute valueInfo ) : void

Serializes a string.

SerializeStruct ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, TagStructureInfo info, object structure ) : void

Serializes a structure into a temporary memory block.

SerializeTag ( IDataBlock block, Tag tag ) : void
SerializeTagBlock ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, object list, Type listType, TagFieldAttribute valueInfo ) : void

Serializes a tag block.

SerializeTagReference ( BinaryWriter writer, TagInstance referencedTag, TagFieldAttribute valueInfo ) : void

Serializes a tag reference.

SerializeValue ( ISerializationContext context, MemoryStream tagStream, IDataBlock block, object val, TagFieldAttribute valueInfo, Type valueType ) : void

Serializes a value.

SerializeVector ( IDataBlock block, System.Vector2 vec ) : void
SerializeVector ( IDataBlock block, System.Vector3 vec ) : void
SerializeVector ( IDataBlock block, System.Vector4 vec ) : void

Method Details

Serialize() public method

Serializes a tag structure into a context.
public Serialize ( ISerializationContext context, object tagStructure, uint offset = null ) : void
context ISerializationContext The serialization context to use.
tagStructure object The tag structure.
offset uint
return void

SerializeMatrix() public static method

public static SerializeMatrix ( IDataBlock block, Matrix4x3 mat ) : void
block IDataBlock
mat TagTool.Common.Matrix4x3
return void

TagSerializer() public method

Constructs a tag serializer for a specific engine version.
public TagSerializer ( DefinitionSet version ) : System
version DefinitionSet The engine version to target.
return System