Changing DLLEXPORT to EXPORT_OUT_API and creating epanet_output_enums.h
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
// data from the output file. As such they return arrays of data. The API
|
||||
// functions automatically allocate memory for the array to be returned. The
|
||||
// caller is responsible for deallocating memory. The function ENR_free() is
|
||||
// provided to deallocate memory.
|
||||
// provided for that purpose.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -96,7 +96,7 @@ int* newIntArray(int n);
|
||||
char* newCharArray(int n);
|
||||
|
||||
|
||||
int DLLEXPORT ENR_init(ENR_Handle* dp_handle)
|
||||
int EXPORT_OUT_API ENR_init(ENR_Handle* dp_handle)
|
||||
// Purpose: Initialized pointer for the opaque ENR_Handle.
|
||||
//
|
||||
// Returns: Error code 0 on success, -1 on failure
|
||||
@@ -122,7 +122,7 @@ int DLLEXPORT ENR_init(ENR_Handle* dp_handle)
|
||||
return errorcode;
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_close(ENR_Handle* p_handle)
|
||||
int EXPORT_OUT_API ENR_close(ENR_Handle* p_handle)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: *p_handle = pointer to ENR_Handle struct
|
||||
**
|
||||
@@ -157,7 +157,7 @@ int DLLEXPORT ENR_close(ENR_Handle* p_handle)
|
||||
return errorcode;
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_open(ENR_Handle p_handle, const char* path)
|
||||
int EXPORT_OUT_API ENR_open(ENR_Handle p_handle, const char* path)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: path
|
||||
** Output: p_handle = pointer to ENR_Handle struct
|
||||
@@ -221,7 +221,7 @@ int DLLEXPORT ENR_open(ENR_Handle p_handle, const char* path)
|
||||
return errorcode;
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getVersion(ENR_Handle p_handle, int* version)
|
||||
int EXPORT_OUT_API ENR_getVersion(ENR_Handle p_handle, int* version)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: p_handle = pointer to ENR_Handle struct
|
||||
** Output: version Epanet version
|
||||
@@ -247,7 +247,7 @@ int DLLEXPORT ENR_getVersion(ENR_Handle p_handle, int* version)
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getNetSize(ENR_Handle p_handle, int** elementCount, int* length)
|
||||
int EXPORT_OUT_API ENR_getNetSize(ENR_Handle p_handle, int** elementCount, int* length)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: p_handle = pointer to ENR_Handle struct
|
||||
** Output: array of element counts (nodes, tanks, links, pumps, valves)
|
||||
@@ -278,7 +278,7 @@ int DLLEXPORT ENR_getNetSize(ENR_Handle p_handle, int** elementCount, int* lengt
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getUnits(ENR_Handle p_handle, ENR_Units code, int* unitFlag)
|
||||
int EXPORT_OUT_API ENR_getUnits(ENR_Handle p_handle, ENR_Units code, int* unitFlag)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: p_handle = pointer to ENR_Handle struct
|
||||
** code
|
||||
@@ -355,7 +355,7 @@ int DLLEXPORT ENR_getUnits(ENR_Handle p_handle, ENR_Units code, int* unitFlag)
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getTimes(ENR_Handle p_handle, ENR_Time code, int* time)
|
||||
int EXPORT_OUT_API ENR_getTimes(ENR_Handle p_handle, ENR_Time code, int* time)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: p_handle = pointer to ENR_Handle struct
|
||||
** code = element code
|
||||
@@ -403,13 +403,13 @@ int DLLEXPORT ENR_getTimes(ENR_Handle p_handle, ENR_Time code, int* time)
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getChemData(ENR_Handle p_handle, char** name, int* length)
|
||||
int EXPORT_OUT_API ENR_getChemData(ENR_Handle p_handle, char** name, int* length)
|
||||
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getElementName(ENR_Handle p_handle, ENR_ElementType type,
|
||||
int EXPORT_OUT_API ENR_getElementName(ENR_Handle p_handle, ENR_ElementType type,
|
||||
int elementIndex, char** name, int* length)
|
||||
/*------------------------------------------------------------------------
|
||||
** Input: p_handle = pointer to ENR_Handle struct
|
||||
@@ -469,7 +469,7 @@ int DLLEXPORT ENR_getElementName(ENR_Handle p_handle, ENR_ElementType type,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getEnergyUsage(ENR_Handle p_handle, int pumpIndex,
|
||||
int EXPORT_OUT_API ENR_getEnergyUsage(ENR_Handle p_handle, int pumpIndex,
|
||||
int* linkIndex, float** outValues, int* length)
|
||||
/*
|
||||
* Purpose: Returns pump energy usage statistics.
|
||||
@@ -514,7 +514,7 @@ int DLLEXPORT ENR_getEnergyUsage(ENR_Handle p_handle, int pumpIndex,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getNetReacts(ENR_Handle p_handle, float** outValues, int* length)
|
||||
int EXPORT_OUT_API ENR_getNetReacts(ENR_Handle p_handle, float** outValues, int* length)
|
||||
/*
|
||||
* Purpose: Returns network wide average reaction rates and average
|
||||
* source mass inflow:
|
||||
@@ -549,7 +549,7 @@ int DLLEXPORT ENR_getNetReacts(ENR_Handle p_handle, float** outValues, int* leng
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
void DLLEXPORT ENR_free(void** array)
|
||||
void EXPORT_OUT_API ENR_free(void** array)
|
||||
//
|
||||
// Purpose: Frees memory allocated by API calls
|
||||
//
|
||||
@@ -560,7 +560,7 @@ void DLLEXPORT ENR_free(void** array)
|
||||
}
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getNodeSeries(ENR_Handle p_handle, int nodeIndex, ENR_NodeAttribute attr,
|
||||
int EXPORT_OUT_API ENR_getNodeSeries(ENR_Handle p_handle, int nodeIndex, ENR_NodeAttribute attr,
|
||||
int startPeriod, int endPeriod, float** outValueSeries, int* dim)
|
||||
//
|
||||
// Purpose: Get time series results for particular attribute. Specify series
|
||||
@@ -595,7 +595,7 @@ int DLLEXPORT ENR_getNodeSeries(ENR_Handle p_handle, int nodeIndex, ENR_NodeAttr
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getLinkSeries(ENR_Handle p_handle, int linkIndex, ENR_LinkAttribute attr,
|
||||
int EXPORT_OUT_API ENR_getLinkSeries(ENR_Handle p_handle, int linkIndex, ENR_LinkAttribute attr,
|
||||
int startPeriod, int endPeriod, float** outValueSeries, int* dim)
|
||||
//
|
||||
// Purpose: Get time series results for particular attribute. Specify series
|
||||
@@ -630,7 +630,7 @@ int DLLEXPORT ENR_getLinkSeries(ENR_Handle p_handle, int linkIndex, ENR_LinkAttr
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getNodeAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
int EXPORT_OUT_API ENR_getNodeAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
ENR_NodeAttribute attr, float** outValueArray, int* length)
|
||||
//
|
||||
// Purpose:
|
||||
@@ -679,7 +679,7 @@ int DLLEXPORT ENR_getNodeAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getLinkAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
int EXPORT_OUT_API ENR_getLinkAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
ENR_LinkAttribute attr, float** outValueArray, int* length)
|
||||
//
|
||||
// Purpose:
|
||||
@@ -729,7 +729,7 @@ int DLLEXPORT ENR_getLinkAttribute(ENR_Handle p_handle, int periodIndex,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getNodeResult(ENR_Handle p_handle, int periodIndex,
|
||||
int EXPORT_OUT_API ENR_getNodeResult(ENR_Handle p_handle, int periodIndex,
|
||||
int nodeIndex, float** outValueArray, int* length)
|
||||
//
|
||||
// Purpose: For a node at given time, get all attributes.
|
||||
@@ -759,7 +759,7 @@ int DLLEXPORT ENR_getNodeResult(ENR_Handle p_handle, int periodIndex,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_getLinkResult(ENR_Handle p_handle, int periodIndex,
|
||||
int EXPORT_OUT_API ENR_getLinkResult(ENR_Handle p_handle, int periodIndex,
|
||||
int linkIndex, float** outValueArray, int* length)
|
||||
//
|
||||
// Purpose: For a link at given time, get all attributes
|
||||
@@ -786,7 +786,7 @@ int DLLEXPORT ENR_getLinkResult(ENR_Handle p_handle, int periodIndex,
|
||||
return set_error(p_data->error_handle, errorcode);
|
||||
}
|
||||
|
||||
void DLLEXPORT ENR_clearError(ENR_Handle p_handle)
|
||||
void EXPORT_OUT_API ENR_clearError(ENR_Handle p_handle)
|
||||
{
|
||||
data_t* p_data;
|
||||
|
||||
@@ -794,7 +794,7 @@ void DLLEXPORT ENR_clearError(ENR_Handle p_handle)
|
||||
clear_error(p_data->error_handle);
|
||||
}
|
||||
|
||||
int DLLEXPORT ENR_checkError(ENR_Handle p_handle, char** msg_buffer)
|
||||
int EXPORT_OUT_API ENR_checkError(ENR_Handle p_handle, char** msg_buffer)
|
||||
{
|
||||
int errorcode = 0;
|
||||
char *temp = NULL;
|
||||
|
||||
Reference in New Issue
Block a user