C# 클래스 Gammtek.Conduit.IO.Converters.EndianConverter

Provides the conversion functionality between two Endian types. This is either a straight-through copy if the Endian settings are the same or a conversion routine reversing the bytes.
파일 보기 프로젝트 열기: ME3Explorer/ME3Explorer 1 사용 예제들

공개 메소드들

메소드 설명
BetweenBuffers ( byte destination, int dstIndex, byte source, int srcIndex, int count ) : void

Performs either a copy or byte order reversal from the source to the destination for count bytes based on the conversion settings.

Convert ( char data ) : char

Converts data to the target Endian format.

Convert ( double data ) : double

Converts data to the target Endian format.

Convert ( float data ) : float

Converts data to the target Endian format.

Convert ( int data ) : int

Converts data to the target Endian format.

Convert ( long data ) : long

Converts data to the target Endian format.

Convert ( short data ) : short

Converts data to the target Endian format.

Convert ( uint data ) : uint

Converts data to the target Endian format.

Convert ( ulong data ) : ulong

Converts data to the target Endian format.

Convert ( ushort data ) : ushort

Converts data to the target Endian format.

Create ( bool convert ) : EndianConverter

Creates a converter based on whether the data needs to be converted or simply copied.

ToBytes ( char data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( double data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( float data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( int data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( long data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( short data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( uint data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( ulong data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToBytes ( ushort data, byte destination, int index ) : void

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.

ToChar ( byte data, int index ) : char

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToDouble ( byte data, int index ) : double

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToInt16 ( byte data, int index ) : short

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToInt32 ( byte data, int index ) : int

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToInt64 ( byte data, int index ) : long

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToSingle ( byte data, int index ) : float

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToUInt16 ( byte data, int index ) : ushort

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToUInt32 ( byte data, int index ) : uint

Returns the type from data starting at index in the correct byte order based on the conversion settings.

ToUInt64 ( byte data, int index ) : ulong

Returns the type from data starting at index in the correct byte order based on the conversion settings.

비공개 메소드들

메소드 설명
CopyLinear ( byte dst, byte src, int count ) : void
CopyReverse ( byte dst, byte src, int count ) : void
EndianConverter ( ) : System
EndianConverter ( RawCopierDelegate copier ) : System
SafeCopier ( byte dst, int dstSize, byte src, int srcSize, int count ) : void

메소드 상세

BetweenBuffers() 공개 메소드

Performs either a copy or byte order reversal from the source to the destination for count bytes based on the conversion settings.
public BetweenBuffers ( byte destination, int dstIndex, byte source, int srcIndex, int count ) : void
destination byte
dstIndex int
source byte
srcIndex int
count int
리턴 void

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( char data ) : char
data char
리턴 char

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( double data ) : double
data double
리턴 double

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( float data ) : float
data float
리턴 float

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( int data ) : int
data int
리턴 int

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( long data ) : long
data long
리턴 long

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( short data ) : short
data short
리턴 short

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( uint data ) : uint
data uint
리턴 uint

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( ulong data ) : ulong
data ulong
리턴 ulong

Convert() 공개 메소드

Converts data to the target Endian format.
public Convert ( ushort data ) : ushort
data ushort
리턴 ushort

Create() 공개 정적인 메소드

Creates a converter based on whether the data needs to be converted or simply copied.
public static Create ( bool convert ) : EndianConverter
convert bool
리턴 EndianConverter

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( char data, byte destination, int index ) : void
data char
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( double data, byte destination, int index ) : void
data double
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( float data, byte destination, int index ) : void
data float
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( int data, byte destination, int index ) : void
data int
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( long data, byte destination, int index ) : void
data long
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( short data, byte destination, int index ) : void
data short
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( uint data, byte destination, int index ) : void
data uint
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( ulong data, byte destination, int index ) : void
data ulong
destination byte
index int
리턴 void

ToBytes() 공개 메소드

Copies the bytes from data to destination starting at index either linearly or reversed based on the conversion settings.
public ToBytes ( ushort data, byte destination, int index ) : void
data ushort
destination byte
index int
리턴 void

ToChar() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToChar ( byte data, int index ) : char
data byte
index int
리턴 char

ToDouble() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToDouble ( byte data, int index ) : double
data byte
index int
리턴 double

ToInt16() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToInt16 ( byte data, int index ) : short
data byte
index int
리턴 short

ToInt32() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToInt32 ( byte data, int index ) : int
data byte
index int
리턴 int

ToInt64() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToInt64 ( byte data, int index ) : long
data byte
index int
리턴 long

ToSingle() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToSingle ( byte data, int index ) : float
data byte
index int
리턴 float

ToUInt16() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToUInt16 ( byte data, int index ) : ushort
data byte
index int
리턴 ushort

ToUInt32() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToUInt32 ( byte data, int index ) : uint
data byte
index int
리턴 uint

ToUInt64() 공개 메소드

Returns the type from data starting at index in the correct byte order based on the conversion settings.
public ToUInt64 ( byte data, int index ) : ulong
data byte
index int
리턴 ulong