Skip to content

Commit

Permalink
Formatted Toolkitapi.h
Browse files Browse the repository at this point in the history
  • Loading branch information
bemcdonnell committed Aug 24, 2017
1 parent 1c3b371 commit 8fbe922
Showing 1 changed file with 40 additions and 41 deletions.
81 changes: 40 additions & 41 deletions src/toolkitAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,54 @@

//#ifndef DLLEXPORT
#ifdef WINDOWS
#ifdef __MINGW32__
// <- More wrapper friendly
#define DLLEXPORT __declspec(dllexport) __cdecl
#else
#define DLLEXPORT __declspec(dllexport) __stdcall
#endif
#ifdef __MINGW32__
// <- More wrapper friendly
#define DLLEXPORT __declspec(dllexport) __cdecl
#else
#define DLLEXPORT
#define DLLEXPORT __declspec(dllexport) __stdcall
#endif
//#endif
#else
#define DLLEXPORT
#endif
//#endif

#ifdef __cplusplus
extern "C" {
#endif
extern "C" {
#endif

#define _CRT_SECURE_NO_DEPRECATE

void DLLEXPORT swmm_getAPIError(int errcode, char *s);

// Input API Exportable Functions
int DLLEXPORT swmm_getSimulationUnit(int type, int *value);
int DLLEXPORT swmm_getSimulationAnalysisSetting(int type, int *value);
int DLLEXPORT swmm_getSimulationParam(int type, double *value);

int DLLEXPORT swmm_countObjects(int type, int *count);
int DLLEXPORT swmm_getObjectId(int type, int index, char *id);

int DLLEXPORT swmm_getNodeType(int index, int *Ntype);
int DLLEXPORT swmm_getLinkType(int index, int *Ltype);

int DLLEXPORT swmm_getLinkConnections(int index, int *Node1, int *Node2);
int DLLEXPORT swmm_getSubcatchOutConnection(int index, int *type, int *Index );

//Nodes
int DLLEXPORT swmm_getNodeParam(int index, int Param, double *value);
int DLLEXPORT swmm_setNodeParam(int index, int Param, double value);
//Links
int DLLEXPORT swmm_getLinkParam(int index, int Param, double *value);
int DLLEXPORT swmm_setLinkParam(int index, int Param, double value);
int DLLEXPORT swmm_getLinkDirection(int index, signed char *value);
//Subcatchments
int DLLEXPORT swmm_getSubcatchParam(int index, int Param, double *value);
int DLLEXPORT swmm_setSubcatchParam(int index, int Param, double value);
//
int DLLEXPORT swmm_getSimulationDateTime(int timetype, int *year, int *month, int *day,
int *hour, int *minute, int *seconds);
int DLLEXPORT swmm_setSimulationDateTime(int timetype, char *dtimestr);
int DLLEXPORT swmm_getSimulationUnit(int type, int *value);
int DLLEXPORT swmm_getSimulationAnalysisSetting(int type, int *value);
int DLLEXPORT swmm_getSimulationParam(int type, double *value);

int DLLEXPORT swmm_countObjects(int type, int *count);
int DLLEXPORT swmm_getObjectId(int type, int index, char *id);

int DLLEXPORT swmm_getNodeType(int index, int *Ntype);
int DLLEXPORT swmm_getLinkType(int index, int *Ltype);

int DLLEXPORT swmm_getLinkConnections(int index, int *Node1, int *Node2);
int DLLEXPORT swmm_getSubcatchOutConnection(int index, int *type, int *Index);

// Nodes
int DLLEXPORT swmm_getNodeParam(int index, int Param, double *value);
int DLLEXPORT swmm_setNodeParam(int index, int Param, double value);
// Links
int DLLEXPORT swmm_getLinkParam(int index, int Param, double *value);
int DLLEXPORT swmm_setLinkParam(int index, int Param, double value);
int DLLEXPORT swmm_getLinkDirection(int index, signed char *value);
// Subcatchments
int DLLEXPORT swmm_getSubcatchParam(int index, int Param, double *value);
int DLLEXPORT swmm_setSubcatchParam(int index, int Param, double value);
//
int DLLEXPORT swmm_getSimulationDateTime(int timetype, int *year, int *month,
int *day, int *hour, int *minute,
int *seconds);
int DLLEXPORT swmm_setSimulationDateTime(int timetype, char *dtimestr);

//-------------------------------
// Active Simulation Results API
Expand All @@ -86,8 +87,6 @@ int DLLEXPORT swmm_getSystemRunoffStats(TRunoffTotals *runoffTot);
int DLLEXPORT swmm_setLinkSetting(int index, double setting);
int DLLEXPORT swmm_setNodeInflow(int index, double flowrate);

#ifdef __cplusplus
} // matches the linkage specification from above */
#ifdef __cplusplus
} // matches the linkage specification from above */
#endif


0 comments on commit 8fbe922

Please sign in to comment.