DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

dwCustomizedFileFunctions Struct Reference

Detailed Description

Data structure representing a customized FileStream that can be passed in.

Definition at line 149 of file Context.h.

Data Fields

void(* close )(dwCustomizedFileHandle hnd)
 Function pointer: Close the file stream. More...
 
bool(* eof )(dwCustomizedFileHandle hnd)
 Function pointer: Check if the end of file flag is set for the file stream. More...
 
bool(* error )(dwCustomizedFileHandle hnd)
 Function pointer: Check if any I/O error occurred during OPEN/RD/WR operations. More...
 
void(* flush )(dwCustomizedFileHandle hnd)
 Function pointer: Synchronizes the file stream, waiting that all requested bytes have been read. More...
 
size_t(* getPosition )(dwCustomizedFileHandle hnd)
 Function pointer: Returns the current position inside the file stream. More...
 
bool(* getString )(dwCustomizedFileHandle hnd, char8_t *ptr, size_t size)
 Function pointer: Read a string from the file stream. More...
 
dwCustomizedFileHandle(* open )(const char8_t *ptr1, const char8_t *ptr2)
 Function pointer: Open the file stream and returns the handle to the file. More...
 
size_t(* read )(dwCustomizedFileHandle hnd, void *ptr, size_t size)
 Function pointer: Read raw data from the file stream and return the number of bytes read. More...
 
void(* setPosition )(dwCustomizedFileHandle hnd, size_t size)
 Function pointer: Set the desired position inside the file stream. More...
 
size_t(* size )(dwCustomizedFileHandle hnd)
 Function pointer: Returns the total number of bytes in the file stream. More...
 
size_t(* write )(dwCustomizedFileHandle hnd, const void *ptr, size_t size)
 Function pointer: Write raw data to the file stream from an input buffer and return the number of bytes written. More...
 

Field Documentation

◆ close

void(* dwCustomizedFileFunctions::close) (dwCustomizedFileHandle hnd)

Function pointer: Close the file stream.

Parameters
hndFile handle

Definition at line 153 of file Context.h.

◆ eof

bool(* dwCustomizedFileFunctions::eof) (dwCustomizedFileHandle hnd)

Function pointer: Check if the end of file flag is set for the file stream.

Parameters
hndFile handle
Returns
true if EOF flag is set, false otherwise

Definition at line 192 of file Context.h.

◆ error

bool(* dwCustomizedFileFunctions::error) (dwCustomizedFileHandle hnd)

Function pointer: Check if any I/O error occurred during OPEN/RD/WR operations.

Parameters
hndFile handle
Returns
true if any error occurred, false otherwise

Definition at line 197 of file Context.h.

◆ flush

void(* dwCustomizedFileFunctions::flush) (dwCustomizedFileHandle hnd)

Function pointer: Synchronizes the file stream, waiting that all requested bytes have been read.

Parameters
hndFile handle

Definition at line 201 of file Context.h.

◆ getPosition

size_t(* dwCustomizedFileFunctions::getPosition) (dwCustomizedFileHandle hnd)

Function pointer: Returns the current position inside the file stream.

Parameters
hndFile handle
Returns
the position (in bytes) of the stream

Definition at line 182 of file Context.h.

◆ getString

bool(* dwCustomizedFileFunctions::getString) (dwCustomizedFileHandle hnd, char8_t *ptr, size_t size)

Function pointer: Read a string from the file stream.

Parameters
hndFile handle
ptrPointer to the input data buffer
Returns
true if the string has been read succesfully, otherwise false.

Definition at line 172 of file Context.h.

◆ open

dwCustomizedFileHandle(* dwCustomizedFileFunctions::open) (const char8_t *ptr1, const char8_t *ptr2)

Function pointer: Open the file stream and returns the handle to the file.

Parameters
ptr1Path of the file to open
ptr2Open mode "READ", "WRITE" or "R/W"
Returns
the handle of the opened file

Definition at line 207 of file Context.h.

◆ read

size_t(* dwCustomizedFileFunctions::read) (dwCustomizedFileHandle hnd, void *ptr, size_t size)

Function pointer: Read raw data from the file stream and return the number of bytes read.

Parameters
hndFile handle
ptrPointer to the buffer to contain the raw data
Returns
the number of bytes read

Definition at line 166 of file Context.h.

◆ setPosition

void(* dwCustomizedFileFunctions::setPosition) (dwCustomizedFileHandle hnd, size_t size)

Function pointer: Set the desired position inside the file stream.

Parameters
hndFile handle
sizeThe position (in bytes) to set

Definition at line 187 of file Context.h.

◆ size

size_t(* dwCustomizedFileFunctions::size) (dwCustomizedFileHandle hnd)

Function pointer: Returns the total number of bytes in the file stream.

Parameters
hndFile handle
Returns
the file length

Definition at line 177 of file Context.h.

◆ write

size_t(* dwCustomizedFileFunctions::write) (dwCustomizedFileHandle hnd, const void *ptr, size_t size)

Function pointer: Write raw data to the file stream from an input buffer and return the number of bytes written.

Parameters
hndFile handle
ptrPointer to the input data buffer
sizeThe size of the buffer
Returns
the number of bytes written

Definition at line 160 of file Context.h.


The documentation for this struct was generated from the following file: