added getter for curve id
This commit is contained in:
0
build/Xcode/epanet/epanet.xcodeproj/project.pbxproj
Normal file → Executable file
0
build/Xcode/epanet/epanet.xcodeproj/project.pbxproj
Normal file → Executable file
0
build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file → Executable file
0
build/Xcode/epanet/epanet.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file → Executable file
2
include/epanet2.h
Normal file → Executable file
2
include/epanet2.h
Normal file → Executable file
@@ -237,7 +237,7 @@ extern "C" {
|
|||||||
int DLLEXPORT ENgetlinknodes(int, int *, int *);
|
int DLLEXPORT ENgetlinknodes(int, int *, int *);
|
||||||
int DLLEXPORT ENgetlinkvalue(int, int, EN_API_FLOAT_TYPE *);
|
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 *);
|
int DLLEXPORT ENgetversion(int *);
|
||||||
|
|||||||
@@ -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
|
** Input: curveIndex = curve index
|
||||||
** Output: *nValues = number of points on curve
|
** 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;
|
pointY[iPoint] = (EN_API_FLOAT_TYPE)y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strncpy(id, curve.ID, MAXID);
|
||||||
*nValues = nPoints;
|
*nValues = nPoints;
|
||||||
*xValues = pointX;
|
*xValues = pointX;
|
||||||
*yValues = pointY;
|
*yValues = pointY;
|
||||||
|
|||||||
Reference in New Issue
Block a user