C# Класс Glare.Assets.AssetLoader

A loader for an Asset.
Наследование: NotifyingObject
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ProgressProperty PropertyInfo

Открытые методы

Метод Описание
AddError ( long offset, string message ) : void

Add a generic load error.

AssetLoader ( AssetManager assetManager, BinaryReader reader, string name, FileManager fileManager, Asset contextResource = null, long length = null ) : Glare.Framework

Initialise the Asset loader.

Expect ( byte expected ) : bool

Expect a UInt16 value; if found, return true; otherwise report an error and return false

Expect ( int expected ) : bool

Expect a Int32 value; if found, return true; otherwise report an error and return false

Expect ( long expected ) : bool

Expect a Int64 value; if found, return true; otherwise report an error and return false

Expect ( sbyte expected ) : bool

Expect a SByte value; if found, return true; otherwise report an error and return false

Expect ( short expected ) : bool

Expect a Int16 value; if found, return true; otherwise report an error and return false

Expect ( uint expected ) : bool

Expect a UInt32 value; if found, return true; otherwise report an error and return false

Expect ( ulong expected ) : bool

Expect a UInt64 value; if found, return true; otherwise report an error and return false

Expect ( ushort expected ) : bool

Expect a Byte value; if found, return true; otherwise report an error and return false

ExpectMagic ( string expected ) : bool

Expect a magic sequence of bytes. If found, return true; otherwise report an error and return false.

ExpectPosition ( long expected ) : bool

Expect the input to be at a given position; if not so, report an error.

ExpectZeroes ( int size, int count ) : bool

Expect a sequence of zeroes, reporting errors if they are not found.

MakeBigEndian ( ) : BinaryReader

Switch the Reader for a BigEndianBinaryReader.

ReadCheckedAbsoluteBox3f ( ) : Box3f

Read a Box3f that is conveyed using absolute coordinates, with a triplet of min values and a triplet of max values. This checks that the min values are less than or equal to the max values, reporting errors if not.

Reset ( ) : void

Reset the stream position to the original position when the asset loader was created.

SetProgressToPosition ( ) : void

Set Progress to the current reader Position, based on the Start offset and the Length.

StartMarking ( ) : MarkingStream

Switch to the use of a MarkingStream.

StartMarking ( BinaryReader &reader ) : MarkingStream

Switch to the use of a MarkingStream.

Приватные методы

Метод Описание
ExpectCore ( long expected, long received ) : bool
ValueToString ( long value ) : string

Описание методов

AddError() публичный Метод

Add a generic load error.
public AddError ( long offset, string message ) : void
offset long
message string
Результат void

AssetLoader() публичный Метод

Initialise the Asset loader.
public AssetLoader ( AssetManager assetManager, BinaryReader reader, string name, FileManager fileManager, Asset contextResource = null, long length = null ) : Glare.Framework
assetManager AssetManager
reader System.IO.BinaryReader
name string
fileManager FileManager The to use to load any attached files. If this is null (the default), then the system file manager () is used.
contextResource Asset
length long
Результат Glare.Framework

Expect() публичный Метод

Expect a UInt16 value; if found, return true; otherwise report an error and return false
public Expect ( byte expected ) : bool
expected byte
Результат bool

Expect() публичный Метод

Expect a Int32 value; if found, return true; otherwise report an error and return false
public Expect ( int expected ) : bool
expected int
Результат bool

Expect() публичный Метод

Expect a Int64 value; if found, return true; otherwise report an error and return false
public Expect ( long expected ) : bool
expected long
Результат bool

Expect() публичный Метод

Expect a SByte value; if found, return true; otherwise report an error and return false
public Expect ( sbyte expected ) : bool
expected sbyte
Результат bool

Expect() публичный Метод

Expect a Int16 value; if found, return true; otherwise report an error and return false
public Expect ( short expected ) : bool
expected short
Результат bool

Expect() публичный Метод

Expect a UInt32 value; if found, return true; otherwise report an error and return false
public Expect ( uint expected ) : bool
expected uint
Результат bool

Expect() публичный Метод

Expect a UInt64 value; if found, return true; otherwise report an error and return false
public Expect ( ulong expected ) : bool
expected ulong
Результат bool

Expect() публичный Метод

Expect a Byte value; if found, return true; otherwise report an error and return false
public Expect ( ushort expected ) : bool
expected ushort
Результат bool

ExpectMagic() публичный Метод

Expect a magic sequence of bytes. If found, return true; otherwise report an error and return false.
public ExpectMagic ( string expected ) : bool
expected string
Результат bool

ExpectPosition() публичный Метод

Expect the input to be at a given position; if not so, report an error.
public ExpectPosition ( long expected ) : bool
expected long
Результат bool

ExpectZeroes() публичный Метод

Expect a sequence of zeroes, reporting errors if they are not found.
public ExpectZeroes ( int size, int count ) : bool
size int
count int
Результат bool

MakeBigEndian() публичный Метод

Switch the Reader for a BigEndianBinaryReader.
public MakeBigEndian ( ) : BinaryReader
Результат BinaryReader

ReadCheckedAbsoluteBox3f() публичный Метод

Read a Box3f that is conveyed using absolute coordinates, with a triplet of min values and a triplet of max values. This checks that the min values are less than or equal to the max values, reporting errors if not.
public ReadCheckedAbsoluteBox3f ( ) : Box3f
Результат Box3f

Reset() публичный Метод

Reset the stream position to the original position when the asset loader was created.
public Reset ( ) : void
Результат void

SetProgressToPosition() публичный Метод

Set Progress to the current reader Position, based on the Start offset and the Length.
public SetProgressToPosition ( ) : void
Результат void

StartMarking() публичный Метод

Switch to the use of a MarkingStream.
public StartMarking ( ) : MarkingStream
Результат MarkingStream

StartMarking() публичный Метод

Switch to the use of a MarkingStream.
public StartMarking ( BinaryReader &reader ) : MarkingStream
reader BinaryReader
Результат MarkingStream

Описание свойств

ProgressProperty публичное статическое свойство

PropertyInfo for the Progress property.
public static PropertyInfo ProgressProperty
Результат PropertyInfo