added getter for curve id

This commit is contained in:
sam hatchett
2013-08-23 12:35:08 -04:00
parent e16de988cf
commit 5b151dd09b
4 changed files with 3 additions and 2 deletions

0
build/Xcode/epanet/epanet.xcodeproj/project.pbxproj Normal file → Executable file
View File

View File

2
include/epanet2.h Normal file → Executable file
View File

@@ -237,7 +237,7 @@ extern "C" {
int DLLEXPORT ENgetlinknodes(int, int *, int *);
int DLLEXPORT ENgetlinkvalue(int, int, EN_API_FLOAT_TYPE *);
int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, EN_API_FLOAT_TYPE **xValues, EN_API_FLOAT_TYPE **yValues);
int DLLEXPORT ENgetcurve(int curveIndex, char* id, int *nValues, EN_API_FLOAT_TYPE **xValues, EN_API_FLOAT_TYPE **yValues);
int DLLEXPORT ENgetversion(int *);

View File

@@ -1750,7 +1750,7 @@ int DLLEXPORT ENgetlinkvalue(int index, int code, EN_API_FLOAT_TYPE *value)
}
int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, EN_API_FLOAT_TYPE **xValues, EN_API_FLOAT_TYPE **yValues)
int DLLEXPORT ENgetcurve(int curveIndex, char* id, int *nValues, EN_API_FLOAT_TYPE **xValues, EN_API_FLOAT_TYPE **yValues)
/*----------------------------------------------------------------
** Input: curveIndex = curve index
** Output: *nValues = number of points on curve
@@ -1776,6 +1776,7 @@ int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, EN_API_FLOAT_TYPE **xVal
pointY[iPoint] = (EN_API_FLOAT_TYPE)y;
}
strncpy(id, curve.ID, MAXID);
*nValues = nPoints;
*xValues = pointX;
*yValues = pointY;