New function clearreport added (see issue #383)

The newly added `gettitle` and `settitle` functions were moved from the Reporting Functions section to the Project (formerly System) Functions section of epanet2.c and epanet.c.
This commit is contained in:
Lew Rossman
2019-02-08 12:07:56 -05:00
parent 140c95214e
commit 36b78f28d3
12 changed files with 211 additions and 141 deletions

View File

@@ -11,7 +11,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 01/08/2019
Last Updated: 02/08/2019
******************************************************************************
*/
@@ -50,7 +50,7 @@ typedef struct Project *EN_Project;
/********************************************************************
System Functions
Project Functions
********************************************************************/
@@ -126,6 +126,33 @@ typedef struct Project *EN_Project;
int DLLEXPORT EN_open(EN_Project ph, const char *inpFile, const char *rptFile,
const char *outFile);
/**
@brief Retrieves the title lines of the project
@param[out] line1 first title line
@param[out] line2 second title line
@param[out] line3 third title line
@return an error code
*/
int DLLEXPORT EN_gettitle(EN_Project ph, char *line1, char *line2, char *line3);
/**
@brief Sets the title lines of the project
@param line1 first title line
@param line2 second title line
@param line3 third title line
@return an error code
*/
int DLLEXPORT EN_settitle(EN_Project ph, char *line1, char *line2, char *line3);
/**
@brief Retrieves the number of objects of a given type in a project.
@param ph an EPANET project handle.
@param object a type of object to count (see @ref EN_CountType)
@param[out] count number of objects of the specified type
@return an error code
*/
int DLLEXPORT EN_getcount(EN_Project ph, int object, int *count);
/**
@brief Saves a project's data to an EPANET-formatted text file.
@param ph an EPANET project handle.
@@ -490,6 +517,13 @@ typedef struct Project *EN_Project;
*/
int DLLEXPORT EN_report(EN_Project ph);
/**
@brief Clears the contents of a project's report file.
@param ph an EPANET project handle.
@return and error code.
*/
int DLLEXPORT EN_clearreport(EN_Project ph);
/**
@brief Resets a project's report options to their default values.
@param ph an EPANET project handle.
@@ -551,15 +585,6 @@ typedef struct Project *EN_Project;
*/
int DLLEXPORT EN_getversion(int *version);
/**
@brief Retrieves the number of objects of a given type in a project.
@param ph an EPANET project handle.
@param object a type of object to count (see @ref EN_CountType)
@param[out] count number of objects of the specified type
@return an error code
*/
int DLLEXPORT EN_getcount(EN_Project ph, int object, int *count);
/**
@brief Returns the text of an error message generated by an error code.
@param errcode an error code.
@@ -579,24 +604,6 @@ typedef struct Project *EN_Project;
@return an error code
*/
int DLLEXPORT EN_getstatistic(EN_Project ph, int type, double* value);
/**
@brief Retrieves the title lines of the project
@param[out] titleline1 first title line
@param[out] titleline2 second title line
@param[out] titleline3 third title line
@return an error code
*/
int DLLEXPORT EN_gettitle(EN_Project ph, char *titleline1, char *titleline2, char *titleline3);
/**
@brief Sets the title lines of the project
@param titleline1 first title line
@param titleline2 second title line
@param titleline3 third title line
@return an error code
*/
int DLLEXPORT EN_settitle(EN_Project ph, char *titleline1, char *titleline2, char *titleline3);
/********************************************************************