|
IPhreeqc 2.18
|
00001 00004 #ifndef INC_IPHREEQC_H 00005 #define INC_IPHREEQC_H 00006 00007 #include "Var.h" 00008 00023 typedef enum { 00024 IPQ_OK = 0, 00025 IPQ_OUTOFMEMORY = -1, 00026 IPQ_BADVARTYPE = -2, 00027 IPQ_INVALIDARG = -3, 00028 IPQ_INVALIDROW = -4, 00029 IPQ_INVALIDCOL = -5, 00030 IPQ_BADINSTANCE = -6 00031 } IPQ_RESULT; 00032 00033 00034 #if defined(__cplusplus) 00035 extern "C" { 00036 #endif 00037 00064 IPQ_DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line); 00065 00066 00087 IPQ_DLL_EXPORT int AddError(int id, const char* error_msg); 00088 00089 00110 IPQ_DLL_EXPORT int AddWarning(int id, const char* warn_msg); 00111 00112 00113 00131 IPQ_DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id); 00132 00133 00157 IPQ_DLL_EXPORT int CreateIPhreeqc(void); 00158 00159 00184 IPQ_DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id); 00185 00186 00216 IPQ_DLL_EXPORT const char* GetComponent(int id, int n); 00217 00218 00243 IPQ_DLL_EXPORT int GetComponentCount(int id); 00244 00245 00263 IPQ_DLL_EXPORT int GetDumpFileOn(int id); 00264 00265 00279 IPQ_DLL_EXPORT const char* GetDumpString(int id); 00280 00281 00308 IPQ_DLL_EXPORT const char* GetDumpStringLine(int id, int n); 00309 00310 00332 IPQ_DLL_EXPORT int GetDumpStringLineCount(int id); 00333 00334 00352 IPQ_DLL_EXPORT int GetDumpStringOn(int id); 00353 00354 00372 IPQ_DLL_EXPORT int GetErrorFileOn(int id); 00373 00374 00383 IPQ_DLL_EXPORT const char* GetErrorString(int id); 00384 00385 00406 IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n); 00407 00408 00426 IPQ_DLL_EXPORT int GetErrorStringLineCount(int id); 00427 00428 00448 IPQ_DLL_EXPORT int GetLogFileOn(int id); 00449 00450 00468 IPQ_DLL_EXPORT int GetOutputFileOn(int id); 00469 00470 00488 IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id); 00489 00490 00508 IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id); 00509 00510 00528 IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id); 00529 00530 00715 IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR); 00716 00717 00726 IPQ_DLL_EXPORT const char* GetWarningString(int id); 00727 00728 00749 IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n); 00750 00751 00769 IPQ_DLL_EXPORT int GetWarningStringLineCount(int id); 00770 00771 00801 IPQ_DLL_EXPORT int LoadDatabase(int id, const char* filename); 00802 00803 00825 IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char* input); 00826 00827 00846 IPQ_DLL_EXPORT void OutputAccumulatedLines(int id); 00847 00848 00870 IPQ_DLL_EXPORT void OutputErrorString(int id); 00871 00872 00888 IPQ_DLL_EXPORT void OutputWarningString(int id); 00889 00890 00914 IPQ_DLL_EXPORT int RunAccumulated(int id); 00915 00916 00943 IPQ_DLL_EXPORT int RunFile(int id, const char* filename); 00944 00945 00970 IPQ_DLL_EXPORT int RunString(int id, const char* input); 00971 00972 00995 IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on); 00996 00997 01027 IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on); 01028 01029 01052 IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on); 01053 01054 01079 IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on); 01080 01081 01104 IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on); 01105 01106 01128 IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on); 01129 01130 01131 // 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); 01132 01133 01134 // TODO int CatchErrors(PFN_CATCH_CALLBACK pfn, void *cookie); 01135 01136 01137 #if defined(__cplusplus) 01138 } 01139 #endif 01140 01141 #endif // INC_IPHREEQC_H
1.7.3