adds client callback API function
This commit is contained in:
@@ -517,6 +517,18 @@ typedef struct Project *EN_Project;
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/**
|
||||
@brief Set a user-supplied callback function for reporting
|
||||
@param ph an EPANET project handle.
|
||||
@param callback a function pointer with declared signature, which gets called by EPANET for reporting.
|
||||
@return an error code.
|
||||
@details The report callback function must have the signature specified - void(void* userData, EN_Project, char*) -
|
||||
use the userData parameter to pass any client context necessary (a context pointer or wrapper object perhaps).
|
||||
Leave un-set or set the report callback to NULL to revert to EPANET's default behavior.
|
||||
**/
|
||||
int DLLEXPORT EN_setReportCallback(EN_Project ph, void (*callback)(void *userData, void *EN_projectHandle, char*));
|
||||
int DLLEXPORT EN_setReportCallbackUserData(EN_Project ph, void *userData);
|
||||
|
||||
/**
|
||||
@brief Writes a line of text to a project's report file.
|
||||
@param ph an EPANET project handle.
|
||||
|
||||
Reference in New Issue
Block a user