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 
436 
449  IPQ_DLL_EXPORT const char* GetErrorString(int id);
450 
451 
476  IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n);
477 
478 
496  IPQ_DLL_EXPORT int GetErrorStringLineCount(int id);
497 
515  IPQ_DLL_EXPORT int GetErrorStringOn(int id);
516 
534  IPQ_DLL_EXPORT const char* GetLogFileName(int id);
535 
536 
555  IPQ_DLL_EXPORT int GetLogFileOn(int id);
556 
557 
572  IPQ_DLL_EXPORT const char* GetLogString(int id);
573 
574 
601  IPQ_DLL_EXPORT const char* GetLogStringLine(int id, int n);
602 
624  IPQ_DLL_EXPORT int GetLogStringLineCount(int id);
625 
626 
644  IPQ_DLL_EXPORT int GetLogStringOn(int id);
645 
646 
671  IPQ_DLL_EXPORT int GetNthSelectedOutputUserNumber(int id, int n);
672 
690  IPQ_DLL_EXPORT const char* GetOutputFileName(int id);
691 
692 
710  IPQ_DLL_EXPORT int GetOutputFileOn(int id);
711 
725  IPQ_DLL_EXPORT const char* GetOutputString(int id);
726 
753  IPQ_DLL_EXPORT const char* GetOutputStringLine(int id, int n);
754 
776  IPQ_DLL_EXPORT int GetOutputStringLineCount(int id);
777 
795  IPQ_DLL_EXPORT int GetOutputStringOn(int id);
796 
797 
815  IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
816 
838  IPQ_DLL_EXPORT int GetSelectedOutputCount(int id);
839 
840 
859  IPQ_DLL_EXPORT const char* GetSelectedOutputFileName(int id);
860 
861 
879  IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id);
880 
881 
899  IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id);
900 
901 
915  IPQ_DLL_EXPORT const char* GetSelectedOutputString(int id);
916 
917 
944  IPQ_DLL_EXPORT const char* GetSelectedOutputStringLine(int id, int n);
945 
946 
968  IPQ_DLL_EXPORT int GetSelectedOutputStringLineCount(int id);
969 
970 
988  IPQ_DLL_EXPORT int GetSelectedOutputStringOn(int id);
989 
990 
1177  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR);
1178 
1179 
1339  IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue2(int id, int row, int col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
1340 
1341 
1362  IPQ_DLL_EXPORT const char* GetVersionString(void);
1363 
1364 
1373  IPQ_DLL_EXPORT const char* GetWarningString(int id);
1374 
1375 
1396  IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n);
1397 
1398 
1416  IPQ_DLL_EXPORT int GetWarningStringLineCount(int id);
1417 
1418 
1448  IPQ_DLL_EXPORT int LoadDatabase(int id, const char* filename);
1449 
1450 
1472  IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char* input);
1473 
1474 
1493  IPQ_DLL_EXPORT void OutputAccumulatedLines(int id);
1494 
1495 
1517  IPQ_DLL_EXPORT void OutputErrorString(int id);
1518 
1519 
1535  IPQ_DLL_EXPORT void OutputWarningString(int id);
1536 
1537 
1561  IPQ_DLL_EXPORT int RunAccumulated(int id);
1562 
1563 
1590  IPQ_DLL_EXPORT int RunFile(int id, const char* filename);
1591 
1592 
1617  IPQ_DLL_EXPORT int RunString(int id, const char* input);
1618 
1634  IPQ_DLL_EXPORT IPQ_RESULT SetBasicCallback(int id, double (*fcn)(double x1, double x2, const char *str, void *cookie), void *cookie1);
1635 
1690 #ifdef IPHREEQC_NO_FORTRAN_MODULE
1691  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
1692 #else
1693  IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, int l));
1694 #endif
1695 
1696 
1727  IPQ_DLL_EXPORT IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n);
1728 
1750  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileName(int id, const char* filename);
1751 
1752 
1775  IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on);
1776 
1777 
1807  IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on);
1808 
1829  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileName(int id, const char* filename);
1830 
1853  IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on);
1854 
1884  IPQ_DLL_EXPORT IPQ_RESULT SetErrorStringOn(int id, int error_string_on);
1885 
1906  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileName(int id, const char* filename);
1907 
1932  IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on);
1933 
1963  IPQ_DLL_EXPORT IPQ_RESULT SetLogStringOn(int id, int log_string_on);
1964 
1965 
1987  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileName(int id, const char* filename);
1988 
2011  IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on);
2012 
2042  IPQ_DLL_EXPORT IPQ_RESULT SetOutputStringOn(int id, int output_string_on);
2043 
2044 
2066  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileName(int id, const char* filename);
2067 
2068 
2091  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
2092 
2122  IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputStringOn(int id, int sel_string_on);
2123 
2124 // 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);
2125 
2126 
2127 // TODO int CatchErrors(PFN_CATCH_CALLBACK pfn, void *cookie);
2128 
2129 
2130 #if defined(__cplusplus)
2131 }
2132 #endif
2133 
2134 #endif // INC_IPHREEQC_H
IPQ_RESULT DestroyIPhreeqc(int id)
IPQ_RESULT SetLogFileName(int id, const char *filename)
IPQ_RESULT SetSelectedOutputFileName(int id, const char *filename)
int RunAccumulated(int id)
int GetSelectedOutputCount(int id)
int GetNthSelectedOutputUserNumber(int id, int n)
const char * GetVersionString(void)
int GetSelectedOutputColumnCount(int id)
int GetOutputFileOn(int id)
const char * GetSelectedOutputStringLine(int id, int n)
const char * GetOutputStringLine(int id, int n)
int GetErrorStringLineCount(int id)
IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR *pVAR)
const char * GetDumpFileName(int id)
const char * GetWarningString(int id)
IPQ_RESULT SetDumpFileName(int id, const char *filename)
Definition: IPhreeqc.h:25
int GetErrorFileOn(int id)
IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n)
IPQ_RESULT SetOutputFileName(int id, const char *filename)
const char * GetOutputString(int id)
int LoadDatabase(int id, const char *filename)
int GetWarningStringLineCount(int id)
int GetDumpStringLineCount(int id)
const char * GetComponent(int id, int n)
IPQ_RESULT SetLogFileOn(int id, int log_on)
IPQ_RESULT SetErrorFileName(int id, const char *filename)
const char * GetSelectedOutputString(int id)
IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on)
int GetComponentCount(int id)
IPQ_RESULT SetErrorStringOn(int id, int error_string_on)
const char * GetErrorString(int id)
int GetSelectedOutputStringLineCount(int id)
Definition: IPhreeqc.h:26
IPQ_RESULT SetBasicFortranCallback(int id, double(*fcn)(double *x1, double *x2, const char *str, int l))
int GetLogFileOn(int id)
const char * GetDumpStringLine(int id, int n)
int GetOutputStringOn(int id)
int RunFile(int id, const char *filename)
const char * GetErrorStringLine(int id, int n)
Definition: IPhreeqc.h:24
IPQ_RESULT
Enumeration used to return error codes.
Definition: IPhreeqc.h:23
int RunString(int id, const char *input)
int GetCurrentSelectedOutputUserNumber(int id)
IPQ_RESULT SetDumpFileOn(int id, int dump_on)
int LoadDatabaseString(int id, const char *input)
Definition: IPhreeqc.h:27
const char * GetOutputFileName(int id)
Definition: IPhreeqc.h:29
IPQ_RESULT SetSelectedOutputStringOn(int id, int sel_string_on)
IPQ_RESULT SetErrorFileOn(int id, int error_on)
IPQ_RESULT SetDumpStringOn(int id, int dump_string_on)
const char * GetLogString(int id)
int GetSelectedOutputStringOn(int id)
int GetOutputStringLineCount(int id)
IPhreeqc VARIANT Documentation
void OutputWarningString(int id)
const char * GetErrorFileName(int id)
const char * GetLogFileName(int id)
const char * GetLogStringLine(int id, int n)
IPQ_RESULT SetOutputStringOn(int id, int output_string_on)
int GetErrorStringOn(int id)
IPQ_RESULT SetLogStringOn(int id, int log_string_on)
int AddWarning(int id, const char *warn_msg)
int CreateIPhreeqc(void)
IPQ_RESULT ClearAccumulatedLines(int id)
void OutputAccumulatedLines(int id)
int GetDumpFileOn(int id)
Datatype used to store SELECTED_OUTPUT values.
Definition: Var.h:44
const char * GetDumpString(int id)
int GetLogStringLineCount(int id)
IPQ_RESULT SetBasicCallback(int id, double(*fcn)(double x1, double x2, const char *str, void *cookie), void *cookie1)
Definition: IPhreeqc.h:30
IPQ_RESULT SetOutputFileOn(int id, int output_on)
int AddError(int id, const char *error_msg)
Definition: IPhreeqc.h:28
int GetSelectedOutputFileOn(int id)
const char * GetSelectedOutputFileName(int id)
IPQ_RESULT AccumulateLine(int id, const char *line)
int GetSelectedOutputRowCount(int id)
int GetLogStringOn(int id)
int GetDumpStringOn(int id)
void OutputErrorString(int id)
IPQ_RESULT GetSelectedOutputValue2(int id, int row, int col, int *vtype, double *dvalue, char *svalue, unsigned int svalue_length)
const char * GetWarningStringLine(int id, int n)