C# Class Reko.Core.EndianImageReader

Inheritance: Reko.Core.ImageReader
ファイルを表示 Open project: smx-smx/reko Class Usage Examples

Public Methods

Method Description
Clone ( ) : EndianImageReader
CreateNew ( Array bytes, ulong offset ) : EndianImageReader

Create a new EndianImageReader with the same endianness as this one.

CreateNew ( MemoryArea image, Reko.Core.Address addr ) : EndianImageReader
Read ( PrimitiveType dataType ) : Constant
ReadAt ( long offset, Func action ) : T
ReadCString ( DataType charType, Encoding encoding ) : StringConstant

Reads a NUL-terminated string starting at the current position.

ReadInt16 ( ) : short
ReadInt16 ( uint offset ) : short
ReadInt32 ( ) : int
ReadInt32 ( uint offset ) : int
ReadInt64 ( ) : long
ReadInt64 ( uint offset ) : long
ReadLengthPrefixedString ( PrimitiveType lengthType, PrimitiveType charType, Encoding encoding ) : StringConstant

Read a character string that is preceded by a character count.

ReadNullCharTerminator ( DataType charType ) : bool

ReadUInt16 ( ) : ushort
ReadUInt16 ( uint offset ) : ushort
ReadUInt32 ( ) : uint
ReadUInt32 ( uint offset ) : uint
ReadUInt64 ( ) : ulong
ReadUInt64 ( uint offset ) : ulong
TryPeekUInt32 ( int offset, uint &value ) : bool
TryRead ( PrimitiveType dataType, Constant &c ) : bool
TryReadInt32 ( int &i32 ) : bool
TryReadInt64 ( long &value ) : bool
TryReadUInt16 ( ushort &ui16 ) : bool
TryReadUInt32 ( uint &ui32 ) : bool
TryReadUInt64 ( ulong &ui64 ) : bool

Protected Methods

Method Description
EndianImageReader ( Array img ) : Reko.Core.Expressions
EndianImageReader ( Array img, ulong off ) : Reko.Core.Expressions
EndianImageReader ( MemoryArea img, Reko.Core.Address addr ) : Reko.Core.Expressions
EndianImageReader ( MemoryArea img, Reko.Core.Address addrBegin, Reko.Core.Address addrEnd ) : Reko.Core.Expressions
EndianImageReader ( MemoryArea img, ulong off ) : Reko.Core.Expressions

Method Details

Clone() public method

public Clone ( ) : EndianImageReader
return EndianImageReader

CreateNew() public abstract method

Create a new EndianImageReader with the same endianness as this one.
public abstract CreateNew ( Array bytes, ulong offset ) : EndianImageReader
bytes Array
offset ulong
return EndianImageReader

CreateNew() public abstract method

public abstract CreateNew ( MemoryArea image, Reko.Core.Address addr ) : EndianImageReader
image MemoryArea
addr Reko.Core.Address
return EndianImageReader

EndianImageReader() protected method

protected EndianImageReader ( Array img ) : Reko.Core.Expressions
img Array
return Reko.Core.Expressions

EndianImageReader() protected method

protected EndianImageReader ( Array img, ulong off ) : Reko.Core.Expressions
img Array
off ulong
return Reko.Core.Expressions

EndianImageReader() protected method

protected EndianImageReader ( MemoryArea img, Reko.Core.Address addr ) : Reko.Core.Expressions
img MemoryArea
addr Reko.Core.Address
return Reko.Core.Expressions

EndianImageReader() protected method

protected EndianImageReader ( MemoryArea img, Reko.Core.Address addrBegin, Reko.Core.Address addrEnd ) : Reko.Core.Expressions
img MemoryArea
addrBegin Reko.Core.Address
addrEnd Reko.Core.Address
return Reko.Core.Expressions

EndianImageReader() protected method

protected EndianImageReader ( MemoryArea img, ulong off ) : Reko.Core.Expressions
img MemoryArea
off ulong
return Reko.Core.Expressions

Read() public abstract method

public abstract Read ( PrimitiveType dataType ) : Constant
dataType PrimitiveType
return Constant

ReadAt() public method

public ReadAt ( long offset, Func action ) : T
offset long
action Func
return T

ReadCString() public method

Reads a NUL-terminated string starting at the current position.
public ReadCString ( DataType charType, Encoding encoding ) : StringConstant
charType DataType
encoding Encoding
return StringConstant

ReadInt16() public abstract method

public abstract ReadInt16 ( ) : short
return short

ReadInt16() public abstract method

public abstract ReadInt16 ( uint offset ) : short
offset uint
return short

ReadInt32() public abstract method

public abstract ReadInt32 ( ) : int
return int

ReadInt32() public abstract method

public abstract ReadInt32 ( uint offset ) : int
offset uint
return int

ReadInt64() public abstract method

public abstract ReadInt64 ( ) : long
return long

ReadInt64() public abstract method

public abstract ReadInt64 ( uint offset ) : long
offset uint
return long

ReadLengthPrefixedString() public method

Read a character string that is preceded by a character count.
public ReadLengthPrefixedString ( PrimitiveType lengthType, PrimitiveType charType, Encoding encoding ) : StringConstant
lengthType PrimitiveType
charType PrimitiveType
encoding Encoding
return StringConstant

ReadNullCharTerminator() public method

public ReadNullCharTerminator ( DataType charType ) : bool
charType DataType
return bool

ReadUInt16() public abstract method

public abstract ReadUInt16 ( ) : ushort
return ushort

ReadUInt16() public abstract method

public abstract ReadUInt16 ( uint offset ) : ushort
offset uint
return ushort

ReadUInt32() public abstract method

public abstract ReadUInt32 ( ) : uint
return uint

ReadUInt32() public abstract method

public abstract ReadUInt32 ( uint offset ) : uint
offset uint
return uint

ReadUInt64() public abstract method

public abstract ReadUInt64 ( ) : ulong
return ulong

ReadUInt64() public abstract method

public abstract ReadUInt64 ( uint offset ) : ulong
offset uint
return ulong

TryPeekUInt32() public abstract method

public abstract TryPeekUInt32 ( int offset, uint &value ) : bool
offset int
value uint
return bool

TryRead() public abstract method

public abstract TryRead ( PrimitiveType dataType, Constant &c ) : bool
dataType PrimitiveType
c Constant
return bool

TryReadInt32() public abstract method

public abstract TryReadInt32 ( int &i32 ) : bool
i32 int
return bool

TryReadInt64() public abstract method

public abstract TryReadInt64 ( long &value ) : bool
value long
return bool

TryReadUInt16() public abstract method

public abstract TryReadUInt16 ( ushort &ui16 ) : bool
ui16 ushort
return bool

TryReadUInt32() public abstract method

public abstract TryReadUInt32 ( uint &ui32 ) : bool
ui32 uint
return bool

TryReadUInt64() public abstract method

public abstract TryReadUInt64 ( ulong &ui64 ) : bool
ui64 ulong
return bool