Closed samhatchett closed 1 year ago
Picky comment: the new functions don't follow the practice of using all lower case for API function names.
Also, can ENsetreportcallback(void (callback)(void userData, void EN_projectHandle, char) and ENsetreportcallbackuserdata(void *userData) functions be added to epanet2.h and epanet2.c to have both single- and multi-threaded versions like we do for all of the other API functions?
@LRossman good catch. I get so used to camel case... and I can totally add mirror functions to the legacy API.
ok, i think this one is good to review and merge based on above feedback.
This addition should be viewed as a helpful counterpart to the
pviewprog
callback that can be passed into theENepanet
function, but with the inclusion of the project handle and a user-supplied context pointer. If the user supplies a reporting callback, their function will be called each time EPANET wants to log anything that used to go into the report file.