IPhreeqc
IPhreeqc.h
Go to the documentation of this file.
1 
4 #ifndef INC_IPHREEQC_H
5 #define INC_IPHREEQC_H
6 
7 #include "Var.h"
8 
23 typedef enum {
24  IPQ_OK = 0,
31 } IPQ_RESULT;
32 
33 
34 #if defined(__cplusplus)
35 extern "C" {
36 #endif
37 
64  IPQ_DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line);
65 
66 
87  IPQ_DLL_EXPORT int AddError(int id, const char* error_msg);
88 
89 
110  IPQ_DLL_EXPORT int AddWarning(int id, const char* warn_msg);
111 
112 
113 
131  IPQ_DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id);
132 
133 
157  IPQ_DLL_EXPORT int CreateIPhreeqc(void);
158 
159 
184  IPQ_DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id);
185 
186 
216  IPQ_DLL_EXPORT const char* GetComponent(int id, int n);
217 
218 
243  IPQ_DLL_EXPORT int GetComponentCount(int id);
244 
265  IPQ_DLL_EXPORT int GetCurrentSelectedOutputUserNumber(int id);
266 
285  IPQ_DLL_EXPORT const char* GetDumpFileName(int id);
286 
287 
305  IPQ_DLL_EXPORT int GetDumpFileOn(int id);
306 
307 
321  IPQ_DLL_EXPORT const char* GetDumpString(int id);
322 
323 
350  IPQ_DLL_EXPORT const char* GetDumpStringLine(int id, int n);
351 
352 
374  IPQ_DLL_EXPORT int GetDumpStringLineCount(int id);
375 
376 
394  IPQ_DLL_EXPORT int GetDumpStringOn(int id);
395 
396 
414  IPQ_DLL_EXPORT const char* GetErrorFileName(int id);
415 
416 
434  IPQ_DLL_EXPORT int GetErrorFileOn(int id);
435 
453  IPQ_DLL_EXPORT int GetErrorOn(int id);
454 
455 
468  IPQ_DLL_EXPORT const char* GetErrorString(int id);
469 
470 
495  IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n);
496 
497 
515  IPQ_DLL_EXPORT int GetErrorStringLineCount(int id);
516 
534  IPQ_DLL_EXPORT int GetErrorStringOn(int id);
535 
553  IPQ_DLL_EXPORT const char* GetLogFileName(int id);
554 
555 
574  IPQ_DLL_EXPORT int GetLogFileOn(int id);
575 
576 
591  IPQ_DLL_EXPORT const char* GetLogString(int id);
592 
593 
620  IPQ_DLL_EXPORT const char* GetLogStringLine(int id, int n);
621 
643  IPQ_DLL_EXPORT int GetLogStringLineCount(int id);
644 
645 
663  IPQ_DLL_EXPORT int GetLogStringOn(int id);
664 
665 
690  IPQ_DLL_EXPORT int GetNthSelectedOutputUserNumber(int id, int n);
691 
709  IPQ_DLL_EXPORT const char* GetOutputFileName(int id);
710 
711 
729  IPQ_DLL_EXPORT int GetOutputFileOn(int id);
730 
744  IPQ_DLL_EXPORT const char* GetOutputString(int id);
745 
772  IPQ_DLL_EXPORT const char* GetOutputStringLine(int id, int n);
773 
795  IPQ_DLL_EXPORT int GetOutputStringLineCount(int id);
796 
814  IPQ_DLL_EXPORT int GetOutputStringOn(int id);
815 
816 
834  IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
835 
857  IPQ_DLL_EXPORT int GetSelectedOutputCount(int id);
858 
859 
878  IPQ_DLL_EXPORT const char* GetSelectedOutputFileName(int id);
879 
880 
898  IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id);
899 
900 
918  IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id);
919 
920 
934  IPQ_DLL_EXPORT const char* GetSelectedOutputString(int id);
935 
936 
963  IPQ_DLL_EXPORT const char* GetSelectedOutputStringLine(int id, int n);
964 
965 
987  IPQ_DLL_EXPORT int GetSelectedOutputStringLineCount(int id);
988 
989 
1007  IPQ_DLL_EXPORT int GetSelectedOutputStringOn(int id);
1008 
1009 
1196  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR);
1197 
1198 
1358  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue2(int id, int row, int col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
1359 
1360 
1381  IPQ_DLL_EXPORT const char* GetVersionString(void);
1382 
1383 
1392  IPQ_DLL_EXPORT const char* GetWarningString(int id);
1393 
1394 
1415  IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n);
1416 
1417 
1435  IPQ_DLL_EXPORT int GetWarningStringLineCount(int id);
1436 
1437 
1467  IPQ_DLL_EXPORT int LoadDatabase(int id, const char* filename);
1468 
1469 
1491  IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char* input);
1492 
1493 
1512  IPQ_DLL_EXPORT void OutputAccumulatedLines(int id);
1513 
1514 
1536  IPQ_DLL_EXPORT void OutputErrorString(int id);
1537 
1538 
1554  IPQ_DLL_EXPORT void OutputWarningString(int id);
1555 
1556 
1580  IPQ_DLL_EXPORT int RunAccumulated(int id);
1581 
1582 
1609  IPQ_DLL_EXPORT int RunFile(int id, const char* filename);
1610 
1611 
1636  IPQ_DLL_EXPORT int RunString(int id, const char* input);
1637 
1653  IPQ_DLL_EXPORT IPQ_RESULT SetBasicCallback(int id, double (*fcn)(double x1, double x2, const char *str, void *cookie), void *cookie1);
1654 
1709 #ifdef IPHREEQC_NO_FORTRAN_MODULE
1710  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
1711 #else
1712  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, int l));
1713 #endif
1714 
1715 
1746  IPQ_DLL_EXPORT IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n);
1747 
1769  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileName(int id, const char* filename);
1770 
1771 
1794  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on);
1795 
1796 
1826  IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on);
1827 
1848  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileName(int id, const char* filename);
1849 
1872  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on);
1873 
1896  IPQ_DLL_EXPORT IPQ_RESULT SetErrorOn(int id, int error_on);
1897 
1898 
1928  IPQ_DLL_EXPORT IPQ_RESULT SetErrorStringOn(int id, int error_string_on);
1929 
1950  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileName(int id, const char* filename);
1951 
1976  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on);
1977 
2007  IPQ_DLL_EXPORT IPQ_RESULT SetLogStringOn(int id, int log_string_on);
2008 
2009 
2031  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileName(int id, const char* filename);
2032 
2055  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on);
2056 
2086  IPQ_DLL_EXPORT IPQ_RESULT SetOutputStringOn(int id, int output_string_on);
2087 
2088 
2110  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileName(int id, const char* filename);
2111 
2112 
2135  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
2136 
2166  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputStringOn(int id, int sel_string_on);
2167 
2168 // TODO int RunWithCallback(PFN_PRERUN_CALLBACK pfn_pre, PFN_POSTRUN_CALLBACK pfn_post, void *cookie, int output_on, int error_on, int log_on, int selected_output_on);
2169 
2170 
2171 // TODO int CatchErrors(PFN_CATCH_CALLBACK pfn, void *cookie);
2172 
2173 
2174 #if defined(__cplusplus)
2175 }
2176 #endif
2177 
2178 #endif // INC_IPHREEQC_H
IPQ_DLL_EXPORT int GetDumpStringOn(int id)
IPQ_DLL_EXPORT int GetWarningStringLineCount(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileName(int id, const char *filename)
IPQ_DLL_EXPORT IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n)
IPQ_DLL_EXPORT const char * GetLogFileName(int id)
IPQ_DLL_EXPORT const char * GetSelectedOutputFileName(int id)
IPQ_DLL_EXPORT int RunString(int id, const char *input)
IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on)
IPQ_DLL_EXPORT const char * GetComponent(int id, int n)
IPQ_DLL_EXPORT int GetLogStringOn(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on)
IPQ_DLL_EXPORT IPQ_RESULT SetLogFileName(int id, const char *filename)
IPQ_DLL_EXPORT IPQ_RESULT SetErrorOn(int id, int error_on)
IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue2(int id, int row, int col, int *vtype, double *dvalue, char *svalue, unsigned int svalue_length)
Definition: IPhreeqc.h:25
IPQ_DLL_EXPORT int GetSelectedOutputStringOn(int id)
IPQ_DLL_EXPORT const char * GetErrorString(int id)
IPQ_DLL_EXPORT const char * GetErrorFileName(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetLogStringOn(int id, int log_string_on)
IPQ_DLL_EXPORT const char * GetOutputString(int id)
IPQ_DLL_EXPORT const char * GetLogStringLine(int id, int n)
IPQ_DLL_EXPORT int AddError(int id, const char *error_msg)
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileName(int id, const char *filename)
IPQ_DLL_EXPORT int GetCurrentSelectedOutputUserNumber(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on)
IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileName(int id, const char *filename)
IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR *pVAR)
IPQ_DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id)
Definition: IPhreeqc.h:26
IPQ_DLL_EXPORT const char * GetSelectedOutputStringLine(int id, int n)
IPQ_DLL_EXPORT int GetNthSelectedOutputUserNumber(int id, int n)
IPQ_DLL_EXPORT int GetSelectedOutputCount(int id)
IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id)
IPQ_DLL_EXPORT int GetOutputFileOn(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on)
IPQ_DLL_EXPORT int GetOutputStringOn(int id)
IPQ_DLL_EXPORT int CreateIPhreeqc(void)
Definition: IPhreeqc.h:24
IPQ_RESULT
Enumeration used to return error codes.
Definition: IPhreeqc.h:23
IPQ_DLL_EXPORT const char * GetOutputFileName(int id)
IPQ_DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line)
IPQ_DLL_EXPORT const char * GetDumpFileName(int id)
IPQ_DLL_EXPORT const char * GetDumpString(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputStringOn(int id, int sel_string_on)
IPQ_DLL_EXPORT int GetErrorFileOn(int id)
IPQ_DLL_EXPORT const char * GetOutputStringLine(int id, int n)
IPQ_DLL_EXPORT int GetSelectedOutputStringLineCount(int id)
Definition: IPhreeqc.h:27
Definition: IPhreeqc.h:29
IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetBasicCallback(int id, double(*fcn)(double x1, double x2, const char *str, void *cookie), void *cookie1)
IPQ_DLL_EXPORT const char * GetWarningStringLine(int id, int n)
IPQ_DLL_EXPORT void OutputWarningString(int id)
IPQ_DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on)
IPQ_DLL_EXPORT int RunFile(int id, const char *filename)
IPhreeqc VARIANT Documentation
IPQ_DLL_EXPORT int GetComponentCount(int id)
IPQ_DLL_EXPORT const char * GetLogString(int id)
IPQ_DLL_EXPORT void OutputErrorString(int id)
IPQ_DLL_EXPORT int GetLogFileOn(int id)
IPQ_DLL_EXPORT int RunAccumulated(int id)
IPQ_DLL_EXPORT const char * GetSelectedOutputString(int id)
IPQ_DLL_EXPORT int GetErrorStringOn(int id)
IPQ_DLL_EXPORT int GetDumpFileOn(int id)
IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id)
Datatype used to store SELECTED_OUTPUT values.
Definition: Var.h:40
IPQ_DLL_EXPORT const char * GetErrorStringLine(int id, int n)
IPQ_DLL_EXPORT void OutputAccumulatedLines(int id)
Definition: IPhreeqc.h:30
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double(*fcn)(double *x1, double *x2, const char *str, int l))
IPQ_DLL_EXPORT int LoadDatabase(int id, const char *filename)
IPQ_DLL_EXPORT IPQ_RESULT SetErrorStringOn(int id, int error_string_on)
IPQ_DLL_EXPORT int AddWarning(int id, const char *warn_msg)
Definition: IPhreeqc.h:28
IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on)
IPQ_DLL_EXPORT IPQ_RESULT SetOutputStringOn(int id, int output_string_on)
IPQ_DLL_EXPORT const char * GetWarningString(int id)
IPQ_DLL_EXPORT int GetErrorOn(int id)
IPQ_DLL_EXPORT int GetDumpStringLineCount(int id)
IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char *input)
IPQ_DLL_EXPORT const char * GetVersionString(void)
IPQ_DLL_EXPORT int GetLogStringLineCount(int id)
IPQ_DLL_EXPORT int GetErrorStringLineCount(int id)
IPQ_DLL_EXPORT int GetOutputStringLineCount(int id)
IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileName(int id, const char *filename)
IPQ_DLL_EXPORT const char * GetDumpStringLine(int id, int n)