Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Package FreeImageAPI.IO

Classes

struct  fi_handle
 Wrapper for a custom handle. More...
 
struct  FreeImageIO
 Structure for implementing access to custom handles. More...
 
class  FreeImageStreamIO
 Internal class wrapping stream io functions.
 
class  StreamWrapper
 Class wrapping streams, implementing a buffer for read data, so that seek operations can be made.
 

Functions

delegate uint ReadProc (IntPtr buffer, uint size, uint count, fi_handle handle)
 Delegate to the C++ function fread. More...
 
delegate uint WriteProc (IntPtr buffer, uint size, uint count, fi_handle handle)
 Delegate to the C++ function fwrite. More...
 
delegate int SeekProc (fi_handle handle, int offset, SeekOrigin origin)
 Delegate to the C++ function fseek. More...
 
delegate int TellProc (fi_handle handle)
 Delegate to the C++ function ftell. More...
 

Function Documentation

delegate uint FreeImageAPI.IO.ReadProc ( IntPtr  buffer,
uint  size,
uint  count,
fi_handle  handle 
)

Delegate to the C++ function fread.

Parameters
bufferPointer to read from.
sizeItem size in bytes.
countMaximum number of items to be read.
handleHandle/stream to read from.
Returns
Number of full items actually read, which may be less than count if an error occurs or if the end of the file is encountered before reaching count.
delegate int FreeImageAPI.IO.SeekProc ( fi_handle  handle,
int  offset,
SeekOrigin  origin 
)

Delegate to the C++ function fseek.

Parameters
handleHandle/stream to seek in.
offsetNumber of bytes from origin.
originInitial position.
Returns
If successful 0 is returned; otherwise a nonzero value.
delegate int FreeImageAPI.IO.TellProc ( fi_handle  handle)

Delegate to the C++ function ftell.

Parameters
handleHandle/stream to retrieve its currents position from.
Returns
The current position.
delegate uint FreeImageAPI.IO.WriteProc ( IntPtr  buffer,
uint  size,
uint  count,
fi_handle  handle 
)

Delegate to the C++ function fwrite.

Parameters
bufferPointer to data to be written.
sizeItem size in bytes.
countMaximum number of items to be written.
handleHandle/stream to write to.
Returns
Number of full items actually written, which may be less than count if an error occurs. Also, if an error occurs, the file-position indicator cannot be determined.