C# Class Quickbeam.ByteAccess.BaseByteAccess

Datei anzeigen Open project: ChadSki/Quickbeam

Protected Properties

Property Type Description
_baOffset int
_baSize int

Public Methods

Method Description
ReadBytes ( int offset, int size ) : byte[]

Performs bounds-checking, then reads bytes from the mapfile

ReadInt16 ( int offset ) : short
ReadInt32 ( int offset ) : int
ReadSingle ( int offset ) : float
ReadString ( int offset ) : string
WriteBytes ( int offset, byte data ) : void

Performs bounds-checking, then writes bytes to the mapfile

WriteInt16 ( int offset, short toWrite ) : void
WriteInt32 ( int offset, int toWrite ) : void

Writes an int to the mapfile, handling endianness

WriteSingle ( int offset, float toWrite ) : void
WriteString ( int offset, string toWrite ) : void

Writes a string, as ascii, to the specified location in the map.

Protected Methods

Method Description
BaseByteAccess ( int offset, int size ) : System
readBytes ( int offset, int size ) : byte[]
writeBytes ( int offset, byte data ) : void

Method Details

BaseByteAccess() protected method

protected BaseByteAccess ( int offset, int size ) : System
offset int
size int
return System

ReadBytes() public method

Performs bounds-checking, then reads bytes from the mapfile
public ReadBytes ( int offset, int size ) : byte[]
offset int The offset in bytes to write to
size int The number of bytes to read
return byte[]

ReadInt16() public method

public ReadInt16 ( int offset ) : short
offset int
return short

ReadInt32() public method

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

ReadSingle() public method

public ReadSingle ( int offset ) : float
offset int
return float

ReadString() public method

public ReadString ( int offset ) : string
offset int
return string

WriteBytes() public method

Performs bounds-checking, then writes bytes to the mapfile
public WriteBytes ( int offset, byte data ) : void
offset int The offset in bytes to write to
data byte The data to write
return void

WriteInt16() public method

public WriteInt16 ( int offset, short toWrite ) : void
offset int
toWrite short
return void

WriteInt32() public method

Writes an int to the mapfile, handling endianness
public WriteInt32 ( int offset, int toWrite ) : void
offset int The offset in bytes to write to
toWrite int The int to write
return void

WriteSingle() public method

public WriteSingle ( int offset, float toWrite ) : void
offset int
toWrite float
return void

WriteString() public method

Writes a string, as ascii, to the specified location in the map.
public WriteString ( int offset, string toWrite ) : void
offset int The offset in bytes to write to
toWrite string The string to write
return void

readBytes() protected abstract method

protected abstract readBytes ( int offset, int size ) : byte[]
offset int
size int
return byte[]

writeBytes() protected abstract method

protected abstract writeBytes ( int offset, byte data ) : void
offset int
data byte
return void

Property Details

_baOffset protected_oe property

protected int _baOffset
return int

_baSize protected_oe property

protected int _baSize
return int