C# Class Axiom.Serialization.Serializer

Summary description for Serializer.
Afficher le fichier Open project: WolfgangSt/axiom

Protected Properties

Свойство Type Description
currentChunkLength int
version string

Méthodes publiques

Méthode Description
Serializer ( ) : System

Default constructor.

Méthodes protégées

Méthode Description
IgnoreCurrentChunk ( BinaryReader reader ) : void

Skips past a particular chunk.

Only really used during development, when logic for handling particular chunks is not yet complete.

IsEOF ( BinaryReader reader ) : bool
ReadBool ( BinaryReader reader ) : bool
ReadBytes ( BinaryReader reader, int count, IntPtr dest ) : void

Reads a specified number of floats and copies them into the destination pointer.

ReadFileChunk ( BinaryReader reader ) : short

Reads a chunk ID and chunk size.

ReadFileHeader ( BinaryReader reader ) : void

Reads a file header and checks the version string.

ReadFloat ( BinaryReader reader ) : float
ReadFloats ( BinaryReader reader, int count, IntPtr dest ) : void

Reads a specified number of floats and copies them into the destination pointer.

ReadFloats ( BinaryReader reader, int count, IntPtr dest, float destArray ) : void

Reads a specified number of floats and copies them into the destination pointer.

This overload will also copy the values into the specified destination array.

ReadInt ( BinaryReader reader ) : int
ReadInts ( BinaryReader reader, int count, IntPtr dest ) : void

Reads a specified number of integers and copies them into the destination pointer.

ReadLong ( BinaryReader reader ) : long
ReadQuat ( BinaryReader reader ) : Quaternion

Reads and returns a Quaternion.

ReadShort ( BinaryReader reader ) : short
ReadShorts ( BinaryReader reader, int count, IntPtr dest ) : void

Reads a specified number of shorts and copies them into the destination pointer.

ReadString ( BinaryReader reader ) : string

Reads from the stream up to the first endline character.

ReadString ( BinaryReader reader, char delimiter ) : string

Reads from the stream up to the specified delimiter character.

ReadUInt ( BinaryReader reader ) : uint
ReadULong ( BinaryReader reader ) : ulong
ReadUShort ( BinaryReader reader ) : ushort
ReadVector3 ( BinaryReader reader ) : Vector3

Reads and returns a Vector3 structure.

ReadVector4 ( BinaryReader reader ) : Vector4

Reads and returns a Vector4 structure.

Seek ( BinaryReader reader, long length ) : void
Seek ( BinaryReader reader, long length, SeekOrigin origin ) : void

Skips to a particular part of the binary stream.

WriteBool ( BinaryWriter writer, bool val ) : void
WriteBytes ( BinaryWriter writer, int count, IntPtr src ) : void

Writes a specified number of bytes.

WriteChunk ( BinaryWriter writer, MeshChunkID id, int chunkLength ) : void

Writes a chunk ID and chunk size. This would be more accurately named WriteChunkHeader, but this name is the counter of ReadChunk.

WriteChunk ( BinaryWriter writer, SkeletonChunkID id, int chunkLength ) : void

Writes a chunk ID and chunk size. This would be more accurately named WriteChunkHeader, but this name is the counter of ReadChunk.

WriteFileHeader ( BinaryWriter writer, string fileVersion ) : void

Writes a file header and version string.

WriteFloat ( BinaryWriter writer, float val ) : void
WriteFloats ( BinaryWriter writer, int count, IntPtr src ) : void

Writes a specified number of floats.

WriteInt ( BinaryWriter writer, int val ) : void
WriteInts ( BinaryWriter writer, int count, IntPtr src ) : void

Writes a specified number of integers.

WriteLong ( BinaryWriter writer, long val ) : void
WriteQuat ( BinaryWriter writer, Quaternion quat ) : void

Reads and returns a Quaternion.

WriteShort ( BinaryWriter writer, short val ) : void
WriteShorts ( BinaryWriter writer, int count, IntPtr src ) : void

Writes a specified number of shorts.

WriteString ( BinaryWriter writer, string str ) : void

Writes the string to the stream including the endline character.

WriteString ( BinaryWriter writer, string str, char delimiter ) : void

Writes the string to the stream including the specified delimiter character.

WriteUInt ( BinaryWriter writer, uint val ) : void
WriteULong ( BinaryWriter writer, ulong val ) : void
WriteUShort ( BinaryWriter writer, ushort val ) : void
WriteVector3 ( BinaryWriter writer, Vector3 vector ) : void

Writes a Vector3 structure.

WriteVector4 ( BinaryWriter writer, Vector4 vector ) : void

Writes a Vector4 structure.

Method Details

IgnoreCurrentChunk() protected méthode

Skips past a particular chunk.
Only really used during development, when logic for handling particular chunks is not yet complete.
protected IgnoreCurrentChunk ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Résultat void

IsEOF() protected méthode

protected IsEOF ( BinaryReader reader ) : bool
reader System.IO.BinaryReader
Résultat bool

ReadBool() protected méthode

protected ReadBool ( BinaryReader reader ) : bool
reader System.IO.BinaryReader
Résultat bool

ReadBytes() protected méthode

Reads a specified number of floats and copies them into the destination pointer.
protected ReadBytes ( BinaryReader reader, int count, IntPtr dest ) : void
reader System.IO.BinaryReader
count int Number of values to read.
dest System.IntPtr Pointer to copy the values into.
Résultat void

ReadFileChunk() protected méthode

Reads a chunk ID and chunk size.
protected ReadFileChunk ( BinaryReader reader ) : short
reader System.IO.BinaryReader
Résultat short

ReadFileHeader() protected méthode

Reads a file header and checks the version string.
protected ReadFileHeader ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Résultat void

ReadFloat() protected méthode

protected ReadFloat ( BinaryReader reader ) : float
reader System.IO.BinaryReader
Résultat float

ReadFloats() protected méthode

Reads a specified number of floats and copies them into the destination pointer.
protected ReadFloats ( BinaryReader reader, int count, IntPtr dest ) : void
reader System.IO.BinaryReader
count int Number of values to read.
dest System.IntPtr Pointer to copy the values into.
Résultat void

ReadFloats() protected méthode

Reads a specified number of floats and copies them into the destination pointer.
This overload will also copy the values into the specified destination array.
protected ReadFloats ( BinaryReader reader, int count, IntPtr dest, float destArray ) : void
reader System.IO.BinaryReader
count int Number of values to read.
dest System.IntPtr Pointer to copy the values into.
destArray float A float array that is to have the values copied into it at the same time as 'dest'.
Résultat void

ReadInt() protected méthode

protected ReadInt ( BinaryReader reader ) : int
reader System.IO.BinaryReader
Résultat int

ReadInts() protected méthode

Reads a specified number of integers and copies them into the destination pointer.
protected ReadInts ( BinaryReader reader, int count, IntPtr dest ) : void
reader System.IO.BinaryReader
count int Number of values to read.
dest System.IntPtr Pointer to copy the values into.
Résultat void

ReadLong() protected méthode

protected ReadLong ( BinaryReader reader ) : long
reader System.IO.BinaryReader
Résultat long

ReadQuat() protected méthode

Reads and returns a Quaternion.
protected ReadQuat ( BinaryReader reader ) : Quaternion
reader System.IO.BinaryReader
Résultat Axiom.Math.Quaternion

ReadShort() protected méthode

protected ReadShort ( BinaryReader reader ) : short
reader System.IO.BinaryReader
Résultat short

ReadShorts() protected méthode

Reads a specified number of shorts and copies them into the destination pointer.
protected ReadShorts ( BinaryReader reader, int count, IntPtr dest ) : void
reader System.IO.BinaryReader
count int Number of values to read.
dest System.IntPtr Pointer to copy the values into.
Résultat void

ReadString() protected méthode

Reads from the stream up to the first endline character.
protected ReadString ( BinaryReader reader ) : string
reader System.IO.BinaryReader
Résultat string

ReadString() protected méthode

Reads from the stream up to the specified delimiter character.
protected ReadString ( BinaryReader reader, char delimiter ) : string
reader System.IO.BinaryReader
delimiter char The character that signals the end of the string.
Résultat string

ReadUInt() protected méthode

protected ReadUInt ( BinaryReader reader ) : uint
reader System.IO.BinaryReader
Résultat uint

ReadULong() protected méthode

protected ReadULong ( BinaryReader reader ) : ulong
reader System.IO.BinaryReader
Résultat ulong

ReadUShort() protected méthode

protected ReadUShort ( BinaryReader reader ) : ushort
reader System.IO.BinaryReader
Résultat ushort

ReadVector3() protected méthode

Reads and returns a Vector3 structure.
protected ReadVector3 ( BinaryReader reader ) : Vector3
reader System.IO.BinaryReader
Résultat Vector3

ReadVector4() protected méthode

Reads and returns a Vector4 structure.
protected ReadVector4 ( BinaryReader reader ) : Vector4
reader System.IO.BinaryReader
Résultat Vector4

Seek() protected méthode

protected Seek ( BinaryReader reader, long length ) : void
reader System.IO.BinaryReader
length long
Résultat void

Seek() protected méthode

Skips to a particular part of the binary stream.
protected Seek ( BinaryReader reader, long length, SeekOrigin origin ) : void
reader System.IO.BinaryReader
length long Number of bytes to skip.
origin SeekOrigin
Résultat void

Serializer() public méthode

Default constructor.
public Serializer ( ) : System
Résultat System

WriteBool() protected méthode

protected WriteBool ( BinaryWriter writer, bool val ) : void
writer System.IO.BinaryWriter
val bool
Résultat void

WriteBytes() protected méthode

Writes a specified number of bytes.
protected WriteBytes ( BinaryWriter writer, int count, IntPtr src ) : void
writer System.IO.BinaryWriter
count int Number of values to write.
src System.IntPtr Pointer that holds the values.
Résultat void

WriteChunk() protected méthode

Writes a chunk ID and chunk size. This would be more accurately named WriteChunkHeader, but this name is the counter of ReadChunk.
protected WriteChunk ( BinaryWriter writer, MeshChunkID id, int chunkLength ) : void
writer System.IO.BinaryWriter
id MeshChunkID
chunkLength int
Résultat void

WriteChunk() protected méthode

Writes a chunk ID and chunk size. This would be more accurately named WriteChunkHeader, but this name is the counter of ReadChunk.
protected WriteChunk ( BinaryWriter writer, SkeletonChunkID id, int chunkLength ) : void
writer System.IO.BinaryWriter
id SkeletonChunkID
chunkLength int
Résultat void

WriteFileHeader() protected méthode

Writes a file header and version string.
protected WriteFileHeader ( BinaryWriter writer, string fileVersion ) : void
writer System.IO.BinaryWriter
fileVersion string
Résultat void

WriteFloat() protected méthode

protected WriteFloat ( BinaryWriter writer, float val ) : void
writer System.IO.BinaryWriter
val float
Résultat void

WriteFloats() protected méthode

Writes a specified number of floats.
protected WriteFloats ( BinaryWriter writer, int count, IntPtr src ) : void
writer System.IO.BinaryWriter
count int Number of values to write.
src System.IntPtr Pointer that holds the values.
Résultat void

WriteInt() protected méthode

protected WriteInt ( BinaryWriter writer, int val ) : void
writer System.IO.BinaryWriter
val int
Résultat void

WriteInts() protected méthode

Writes a specified number of integers.
protected WriteInts ( BinaryWriter writer, int count, IntPtr src ) : void
writer System.IO.BinaryWriter
count int Number of values to write.
src System.IntPtr Pointer that holds the values.
Résultat void

WriteLong() protected méthode

protected WriteLong ( BinaryWriter writer, long val ) : void
writer System.IO.BinaryWriter
val long
Résultat void

WriteQuat() protected méthode

Reads and returns a Quaternion.
protected WriteQuat ( BinaryWriter writer, Quaternion quat ) : void
writer System.IO.BinaryWriter
quat Axiom.Math.Quaternion
Résultat void

WriteShort() protected méthode

protected WriteShort ( BinaryWriter writer, short val ) : void
writer System.IO.BinaryWriter
val short
Résultat void

WriteShorts() protected méthode

Writes a specified number of shorts.
protected WriteShorts ( BinaryWriter writer, int count, IntPtr src ) : void
writer System.IO.BinaryWriter
count int Number of values to write.
src System.IntPtr Pointer that holds the values.
Résultat void

WriteString() protected méthode

Writes the string to the stream including the endline character.
protected WriteString ( BinaryWriter writer, string str ) : void
writer System.IO.BinaryWriter
str string
Résultat void

WriteString() protected méthode

Writes the string to the stream including the specified delimiter character.
protected WriteString ( BinaryWriter writer, string str, char delimiter ) : void
writer System.IO.BinaryWriter
str string
delimiter char The character that signals the end of the string.
Résultat void

WriteUInt() protected méthode

protected WriteUInt ( BinaryWriter writer, uint val ) : void
writer System.IO.BinaryWriter
val uint
Résultat void

WriteULong() protected méthode

protected WriteULong ( BinaryWriter writer, ulong val ) : void
writer System.IO.BinaryWriter
val ulong
Résultat void

WriteUShort() protected méthode

protected WriteUShort ( BinaryWriter writer, ushort val ) : void
writer System.IO.BinaryWriter
val ushort
Résultat void

WriteVector3() protected méthode

Writes a Vector3 structure.
protected WriteVector3 ( BinaryWriter writer, Vector3 vector ) : void
writer System.IO.BinaryWriter
vector Vector3
Résultat void

WriteVector4() protected méthode

Writes a Vector4 structure.
protected WriteVector4 ( BinaryWriter writer, Vector4 vector ) : void
writer System.IO.BinaryWriter
vector Vector4
Résultat void

Property Details

currentChunkLength protected_oe property

Length of the chunk that is currently being processed.
protected int currentChunkLength
Résultat int

version protected_oe property

Version string of this serializer.
protected string version
Résultat string