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 
9 #ifdef IPHREEQC_NO_FORTRAN_MODULE
10 #include <stddef.h>
11 #endif
12 
27 typedef enum {
28  IPQ_OK = 0,
35 } IPQ_RESULT;
36 
37 
38 #if defined(__cplusplus)
39 extern "C" {
40 #endif
41 
68  IPQ_DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line);
69 
70 
91  IPQ_DLL_EXPORT int AddError(int id, const char* error_msg);
92 
93 
114  IPQ_DLL_EXPORT int AddWarning(int id, const char* warn_msg);
115 
116 
117 
135  IPQ_DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id);
136 
137 
161  IPQ_DLL_EXPORT int CreateIPhreeqc(void);
162 
163 
188  IPQ_DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id);
189 
190 
220  IPQ_DLL_EXPORT const char* GetComponent(int id, int n);
221 
222 
247  IPQ_DLL_EXPORT int GetComponentCount(int id);
248 
269  IPQ_DLL_EXPORT int GetCurrentSelectedOutputUserNumber(int id);
270 
289  IPQ_DLL_EXPORT const char* GetDumpFileName(int id);
290 
291 
309  IPQ_DLL_EXPORT int GetDumpFileOn(int id);
310 
311 
325  IPQ_DLL_EXPORT const char* GetDumpString(int id);
326 
327 
354  IPQ_DLL_EXPORT const char* GetDumpStringLine(int id, int n);
355 
356 
378  IPQ_DLL_EXPORT int GetDumpStringLineCount(int id);
379 
380 
398  IPQ_DLL_EXPORT int GetDumpStringOn(int id);
399 
400 
418  IPQ_DLL_EXPORT const char* GetErrorFileName(int id);
419 
420 
438  IPQ_DLL_EXPORT int GetErrorFileOn(int id);
439 
457  IPQ_DLL_EXPORT int GetErrorOn(int id);
458 
459 
472  IPQ_DLL_EXPORT const char* GetErrorString(int id);
473 
474 
499  IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n);
500 
501 
519  IPQ_DLL_EXPORT int GetErrorStringLineCount(int id);
520 
538  IPQ_DLL_EXPORT int GetErrorStringOn(int id);
539 
557  IPQ_DLL_EXPORT const char* GetLogFileName(int id);
558 
559 
578  IPQ_DLL_EXPORT int GetLogFileOn(int id);
579 
580 
595  IPQ_DLL_EXPORT const char* GetLogString(int id);
596 
597 
624  IPQ_DLL_EXPORT const char* GetLogStringLine(int id, int n);
625 
647  IPQ_DLL_EXPORT int GetLogStringLineCount(int id);
648 
649 
667  IPQ_DLL_EXPORT int GetLogStringOn(int id);
668 
669 
694  IPQ_DLL_EXPORT int GetNthSelectedOutputUserNumber(int id, int n);
695 
713  IPQ_DLL_EXPORT const char* GetOutputFileName(int id);
714 
715 
733  IPQ_DLL_EXPORT int GetOutputFileOn(int id);
734 
748  IPQ_DLL_EXPORT const char* GetOutputString(int id);
749 
776  IPQ_DLL_EXPORT const char* GetOutputStringLine(int id, int n);
777 
799  IPQ_DLL_EXPORT int GetOutputStringLineCount(int id);
800 
818  IPQ_DLL_EXPORT int GetOutputStringOn(int id);
819 
820 
838  IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
839 
861  IPQ_DLL_EXPORT int GetSelectedOutputCount(int id);
862 
863 
882  IPQ_DLL_EXPORT const char* GetSelectedOutputFileName(int id);
883 
884 
902  IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id);
903 
904 
922  IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id);
923 
924 
938  IPQ_DLL_EXPORT const char* GetSelectedOutputString(int id);
939 
940 
967  IPQ_DLL_EXPORT const char* GetSelectedOutputStringLine(int id, int n);
968 
969 
991  IPQ_DLL_EXPORT int GetSelectedOutputStringLineCount(int id);
992 
993 
1011  IPQ_DLL_EXPORT int GetSelectedOutputStringOn(int id);
1012 
1013 
1200  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR);
1201 
1202 
1362  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue2(int id, int row, int col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
1363 
1364 
1385  IPQ_DLL_EXPORT const char* GetVersionString(void);
1386 
1387 
1396  IPQ_DLL_EXPORT const char* GetWarningString(int id);
1397 
1398 
1419  IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n);
1420 
1421 
1439  IPQ_DLL_EXPORT int GetWarningStringLineCount(int id);
1440 
1441 
1471  IPQ_DLL_EXPORT int LoadDatabase(int id, const char* filename);
1472 
1473 
1495  IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char* input);
1496 
1497 
1516  IPQ_DLL_EXPORT void OutputAccumulatedLines(int id);
1517 
1518 
1540  IPQ_DLL_EXPORT void OutputErrorString(int id);
1541 
1542 
1558  IPQ_DLL_EXPORT void OutputWarningString(int id);
1559 
1560 
1584  IPQ_DLL_EXPORT int RunAccumulated(int id);
1585 
1586 
1613  IPQ_DLL_EXPORT int RunFile(int id, const char* filename);
1614 
1615 
1640  IPQ_DLL_EXPORT int RunString(int id, const char* input);
1641 
1657  IPQ_DLL_EXPORT IPQ_RESULT SetBasicCallback(int id, double (*fcn)(double x1, double x2, const char *str, void *cookie), void *cookie1);
1658 
1713 #ifdef IPHREEQC_NO_FORTRAN_MODULE
1714  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, size_t l));
1715 #else
1716  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, int l));
1717 #endif
1718 
1719 
1750  IPQ_DLL_EXPORT IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n);
1751 
1773  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileName(int id, const char* filename);
1774 
1775 
1798  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on);
1799 
1800 
1830  IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on);
1831 
1852  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileName(int id, const char* filename);
1853 
1876  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on);
1877 
1900  IPQ_DLL_EXPORT IPQ_RESULT SetErrorOn(int id, int error_on);
1901 
1902 
1932  IPQ_DLL_EXPORT IPQ_RESULT SetErrorStringOn(int id, int error_string_on);
1933 
1954  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileName(int id, const char* filename);
1955 
1980  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on);
1981 
2011  IPQ_DLL_EXPORT IPQ_RESULT SetLogStringOn(int id, int log_string_on);
2012 
2013 
2035  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileName(int id, const char* filename);
2036 
2059  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on);
2060 
2090  IPQ_DLL_EXPORT IPQ_RESULT SetOutputStringOn(int id, int output_string_on);
2091 
2092 
2114  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileName(int id, const char* filename);
2115 
2116 
2139  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
2140 
2170  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputStringOn(int id, int sel_string_on);
2171 
2172 // 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);
2173 
2174 
2175 // TODO int CatchErrors(PFN_CATCH_CALLBACK pfn, void *cookie);
2176 
2177 
2178 #if defined(__cplusplus)
2179 }
2180 #endif
2181 
2182 #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:29
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:30
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:28
IPQ_RESULT
Enumeration used to return error codes.
Definition: IPhreeqc.h:27
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:31
Definition: IPhreeqc.h:33
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:34
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:32
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)