mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
# IPQ_DLL_EXPORT int GetDumpOn(int id);
# IPQ_DLL_EXPORT int GetDumpFileOn(int id); # IPQ_DLL_EXPORT IPQ_RESULT SetDumpOn(int id, int dump_on); # IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on); s/etDumpOn/etDumpFileOn/g s/etdumpon/etdumpfileon/g s/ETDUMPON/ETDUMPFILEON/g # IPQ_DLL_EXPORT int GetErrorOn(int id); # IPQ_DLL_EXPORT int GetErrorFileOn(int id); # IPQ_DLL_EXPORT IPQ_RESULT SetErrorOn(int id, int error_on); # IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on); s/etErrorOn/etErrorFileOn/g s/eterroron/eterrorfileon/g s/ETERRORON/ETERRORFILEON/g # IPQ_DLL_EXPORT int GetLogOn(int id); # IPQ_DLL_EXPORT int GetLogFileOn(int id); # IPQ_DLL_EXPORT IPQ_RESULT SetLogOn(int id, int log_on); # IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on); s/etLogOn/etLogFileOn/g s/etlogon/etlogfileon/g s/ETLOGON/ETLOGFILEON/g # IPQ_DLL_EXPORT int GetOutputOn(int id); # IPQ_DLL_EXPORT int GetOutputFileOn(int id); # IPQ_DLL_EXPORT IPQ_RESULT SetOutputOn(int id, int output_on); # IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on); s/etOutputOn/etOutputFileOn/g s/etoutputon/etoutputfileon/g s/ETOUTPUTON/ETOUTPUTFILEON/g # IPQ_DLL_EXPORT int GetSelectedOutputOn(int id); # IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id); # IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputOn(int id, int sel_on); # IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on); s/etSelectedOutputOn/etSelectedOutputFileOn/g s/etselectedoutputon/etselectedoutputfileon/g s/ETSELECTEDOUTPUTON/ETSELECTEDOUTPUTFILEON/g # IPQ_DLL_EXPORT const char* GetDumpLine(int id, int n); # IPQ_DLL_EXPORT const char* GetDumpStringLine(int id, int n); # IPQ_DLL_EXPORT int GetDumpLineCount(int id); # IPQ_DLL_EXPORT int GetDumpStringLineCount(int id); s/GetDumpLine/GetDumpStringLine/g s/getdumpline/getdumpstringline/g s/GETDUMPLINE/GETDUMPSTRINGLINE/g # IPQ_DLL_EXPORT const char* GetErrorLine(int id, int n); # IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n); # IPQ_DLL_EXPORT int GetErrorLineCount(int id); # IPQ_DLL_EXPORT int GetErrorStringLineCount(int id); s/GetErrorLine/GetErrorStringLine/g s/geterrorline/geterrorstringline/g s/GETERRORLINE/GETERRORSTRINGLINE/g # IPQ_DLL_EXPORT const char* GetWarningLine(int id, int n); # IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n); # IPQ_DLL_EXPORT int GetWarningLineCount(int id); # IPQ_DLL_EXPORT int GetWarningStringLineCount(int id); s/GetWarningLine/GetWarningStringLine/g s/getwarningline/getwarningstringline/g s/GETWARNINGLINE/GETWARNINGSTRINGLINE/g # IPQ_DLL_EXPORT void OutputError(int id); # IPQ_DLL_EXPORT void OutputErrorString(int id); s/OutputError/OutputErrorString/g s/outputerror/outputerrorstring/g s/OUTPUTERROR/OUTPUTERRORSTRING/g # IPQ_DLL_EXPORT void OutputLines(int id); # IPQ_DLL_EXPORT void OutputAccumulatedLines(int id); s/OutputLines/OutputAccumulatedLines/g s/outputlines/outputaccumulatedlines/g s/OUTPUTLINES/OUTPUTACCUMULATEDLINES/g # IPQ_DLL_EXPORT void OutputWarning(int id); # IPQ_DLL_EXPORT void OutputWarningString(int id); s/OutputWarning/OutputWarningString/g s/outputwarning/outputwarningstring/g s/OUTPUTWARNING/OUTPUTWARNINGSTRING/g git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4411 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
8cfffff789
commit
2c4422593b
@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ([2.64])
|
AC_PREREQ([2.64])
|
||||||
AC_INIT([IPhreeqc], [2.17.1-4389], [charlton@usgs.gov])
|
AC_INIT([IPhreeqc], [2.17.1-4411], [charlton@usgs.gov])
|
||||||
AC_CONFIG_AUX_DIR([config])
|
AC_CONFIG_AUX_DIR([config])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
|||||||
@ -13,19 +13,19 @@ main(int argc, const char* argv[])
|
|||||||
|
|
||||||
if (LoadDatabase(id, "phreeqc.dat") != 0)
|
if (LoadDatabase(id, "phreeqc.dat") != 0)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RunFile(id, "ex1") != 0)
|
if (RunFile(id, "ex1") != 0)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DestroyIPhreeqc(id) != IPQ_OK)
|
if (DestroyIPhreeqc(id) != IPQ_OK)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,17 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (RunFile(id, "ex1").NE.0) THEN
|
IF (RunFile(id, "ex1").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (DestroyIPhreeqc(id).NE.0) THEN
|
IF (DestroyIPhreeqc(id).NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,17 @@ SUBROUTINE F_MAIN
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (RunFile(id, "ex1").NE.0) THEN
|
IF (RunFile(id, "ex1").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (DestroyIPhreeqc(id).NE.0) THEN
|
IF (DestroyIPhreeqc(id).NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
STOP
|
STOP
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
|||||||
@ -46,33 +46,33 @@ C
|
|||||||
INTEGER(KIND=4) CreateIPhreeqc
|
INTEGER(KIND=4) CreateIPhreeqc
|
||||||
INTEGER(KIND=4) DestroyIPhreeqc
|
INTEGER(KIND=4) DestroyIPhreeqc
|
||||||
INTEGER(KIND=4) GetComponentCount
|
INTEGER(KIND=4) GetComponentCount
|
||||||
INTEGER(KIND=4) GetDumpLine
|
INTEGER(KIND=4) GetDumpStringLine
|
||||||
INTEGER(KIND=4) GetDumpLineCount
|
INTEGER(KIND=4) GetDumpStringLineCount
|
||||||
LOGICAL(KIND=4) GetDumpOn
|
LOGICAL(KIND=4) GetDumpFileOn
|
||||||
LOGICAL(KIND=4) GetDumpStringOn
|
LOGICAL(KIND=4) GetDumpStringOn
|
||||||
INTEGER(KIND=4) GetErrorLine
|
INTEGER(KIND=4) GetErrorStringLine
|
||||||
INTEGER(KIND=4) GetErrorLineCount
|
INTEGER(KIND=4) GetErrorStringLineCount
|
||||||
LOGICAL(KIND=4) GetErrorOn
|
LOGICAL(KIND=4) GetErrorFileOn
|
||||||
LOGICAL(KIND=4) GetLogOn
|
LOGICAL(KIND=4) GetLogFileOn
|
||||||
LOGICAL(KIND=4) GetOutputOn
|
LOGICAL(KIND=4) GetOutputFileOn
|
||||||
INTEGER(KIND=4) GetSelectedOutputColumnCount
|
INTEGER(KIND=4) GetSelectedOutputColumnCount
|
||||||
LOGICAL(KIND=4) GetSelectedOutputOn
|
LOGICAL(KIND=4) GetSelectedOutputFileOn
|
||||||
INTEGER(KIND=4) GetSelectedOutputRowCount
|
INTEGER(KIND=4) GetSelectedOutputRowCount
|
||||||
INTEGER(KIND=4) GetSelectedOutputValue
|
INTEGER(KIND=4) GetSelectedOutputValue
|
||||||
INTEGER(KIND=4) GetWarningLine
|
INTEGER(KIND=4) GetWarningStringLine
|
||||||
INTEGER(KIND=4) GetWarningLineCount
|
INTEGER(KIND=4) GetWarningStringLineCount
|
||||||
INTEGER(KIND=4) LoadDatabase
|
INTEGER(KIND=4) LoadDatabase
|
||||||
INTEGER(KIND=4) LoadDatabaseString
|
INTEGER(KIND=4) LoadDatabaseString
|
||||||
INTEGER(KIND=4) OutputLastError
|
INTEGER(KIND=4) OutputLastError
|
||||||
INTEGER(KIND=4) OutputLastWarning
|
INTEGER(KIND=4) OutputLastWarning
|
||||||
INTEGER(KIND=4) OutputLines
|
INTEGER(KIND=4) OutputAccumulatedLines
|
||||||
INTEGER(KIND=4) RunAccumulated
|
INTEGER(KIND=4) RunAccumulated
|
||||||
INTEGER(KIND=4) RunFile
|
INTEGER(KIND=4) RunFile
|
||||||
INTEGER(KIND=4) RunString
|
INTEGER(KIND=4) RunString
|
||||||
INTEGER(KIND=4) SetDumpOn
|
INTEGER(KIND=4) SetDumpFileOn
|
||||||
INTEGER(KIND=4) SetDumpStringOn
|
INTEGER(KIND=4) SetDumpStringOn
|
||||||
INTEGER(KIND=4) SetErrorOn
|
INTEGER(KIND=4) SetErrorFileOn
|
||||||
INTEGER(KIND=4) SetLogOn
|
INTEGER(KIND=4) SetLogFileOn
|
||||||
INTEGER(KIND=4) SetOutputOn
|
INTEGER(KIND=4) SetOutputFileOn
|
||||||
INTEGER(KIND=4) SetSelectedOutputOn
|
INTEGER(KIND=4) SetSelectedOutputFileOn
|
||||||
INTEGER(KIND=4) UnLoadDatabase
|
INTEGER(KIND=4) UnLoadDatabase
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE GetDumpLine(ID,N,LINE)
|
SUBROUTINE GetDumpStringLine(ID,N,LINE)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4), INTENT(IN) :: N
|
INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||||
@ -66,18 +66,18 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetDumpLineCount(ID)
|
FUNCTION GetDumpStringLineCount(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4) :: GetDumpLineCount
|
INTEGER(KIND=4) :: GetDumpStringLineCount
|
||||||
END FUNCTION GetDumpLineCount
|
END FUNCTION GetDumpStringLineCount
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetDumpOn(ID)
|
FUNCTION GetDumpFileOn(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4) :: GetDumpOn
|
LOGICAL(KIND=4) :: GetDumpFileOn
|
||||||
END FUNCTION GetDumpOn
|
END FUNCTION GetDumpFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE GetErrorLine(ID,N,LINE)
|
SUBROUTINE GetErrorStringLine(ID,N,LINE)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4), INTENT(IN) :: N
|
INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||||
@ -99,34 +99,34 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetErrorLineCount(ID)
|
FUNCTION GetErrorStringLineCount(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4) :: GetErrorLineCount
|
INTEGER(KIND=4) :: GetErrorStringLineCount
|
||||||
END FUNCTION GetErrorLineCount
|
END FUNCTION GetErrorStringLineCount
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetErrorOn(ID)
|
FUNCTION GetErrorFileOn(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4) :: GetErrorOn
|
LOGICAL(KIND=4) :: GetErrorFileOn
|
||||||
END FUNCTION GetErrorOn
|
END FUNCTION GetErrorFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetLogOn(ID)
|
FUNCTION GetLogFileOn(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4) :: GetLogOn
|
LOGICAL(KIND=4) :: GetLogFileOn
|
||||||
END FUNCTION GetLogOn
|
END FUNCTION GetLogFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetOutputOn(ID)
|
FUNCTION GetOutputFileOn(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4) :: GetOutputOn
|
LOGICAL(KIND=4) :: GetOutputFileOn
|
||||||
END FUNCTION GetOutputOn
|
END FUNCTION GetOutputFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -139,10 +139,10 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetSelectedOutputOn(ID)
|
FUNCTION GetSelectedOutputFileOn(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4) :: GetSelectedOutputOn
|
LOGICAL(KIND=4) :: GetSelectedOutputFileOn
|
||||||
END FUNCTION GetSelectedOutputOn
|
END FUNCTION GetSelectedOutputFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -168,7 +168,7 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE GetWarningLine(ID,N,LINE)
|
SUBROUTINE GetWarningStringLine(ID,N,LINE)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4), INTENT(IN) :: N
|
INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||||
@ -177,10 +177,10 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION GetWarningLineCount(ID)
|
FUNCTION GetWarningStringLineCount(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
INTEGER(KIND=4) :: GetWarningLineCount
|
INTEGER(KIND=4) :: GetWarningStringLineCount
|
||||||
END FUNCTION GetWarningLineCount
|
END FUNCTION GetWarningStringLineCount
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -203,19 +203,19 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE OutputError(ID)
|
SUBROUTINE OutputErrorString(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
END SUBROUTINE OutputError
|
END SUBROUTINE OutputErrorString
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
!!! TODO OutputWarning
|
!!! TODO OutputWarningString
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
SUBROUTINE OutputLines(ID)
|
SUBROUTINE OutputAccumulatedLines(ID)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
END SUBROUTINE OutputLines
|
END SUBROUTINE OutputAccumulatedLines
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -246,11 +246,11 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION SetDumpOn(ID,DUMP_ON)
|
FUNCTION SetDumpFileOn(ID,DUMP_ON)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
||||||
INTEGER(KIND=4) :: SetDumpOn
|
INTEGER(KIND=4) :: SetDumpFileOn
|
||||||
END FUNCTION SetDumpOn
|
END FUNCTION SetDumpFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
@ -264,38 +264,38 @@
|
|||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION SetErrorOn(ID,ERR_ON)
|
FUNCTION SetErrorFileOn(ID,ERR_ON)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4), INTENT(IN) :: ERR_ON
|
LOGICAL(KIND=4), INTENT(IN) :: ERR_ON
|
||||||
INTEGER(KIND=4) :: SetErrorOn
|
INTEGER(KIND=4) :: SetErrorFileOn
|
||||||
END FUNCTION SetErrorOn
|
END FUNCTION SetErrorFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION SetLogOn(ID,LOG_ON)
|
FUNCTION SetLogFileOn(ID,LOG_ON)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4), INTENT(IN) :: LOG_ON
|
LOGICAL(KIND=4), INTENT(IN) :: LOG_ON
|
||||||
INTEGER(KIND=4) :: SetLogOn
|
INTEGER(KIND=4) :: SetLogFileOn
|
||||||
END FUNCTION SetLogOn
|
END FUNCTION SetLogFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION SetOutputOn(ID,OUT_ON)
|
FUNCTION SetOutputFileOn(ID,OUT_ON)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4), INTENT(IN) :: OUT_ON
|
LOGICAL(KIND=4), INTENT(IN) :: OUT_ON
|
||||||
INTEGER(KIND=4) :: SetOutputOn
|
INTEGER(KIND=4) :: SetOutputFileOn
|
||||||
END FUNCTION SetOutputOn
|
END FUNCTION SetOutputFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION SetSelectedOutputOn(ID,SEL_ON)
|
FUNCTION SetSelectedOutputFileOn(ID,SEL_ON)
|
||||||
INTEGER(KIND=4), INTENT(IN) :: ID
|
INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
LOGICAL(KIND=4), INTENT(IN) :: SEL_ON
|
LOGICAL(KIND=4), INTENT(IN) :: SEL_ON
|
||||||
INTEGER(KIND=4) :: SetSelectedOutputOn
|
INTEGER(KIND=4) :: SetSelectedOutputFileOn
|
||||||
END FUNCTION SetSelectedOutputOn
|
END FUNCTION SetSelectedOutputFileOn
|
||||||
END INTERFACE
|
END INTERFACE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,12 +6,6 @@
|
|||||||
|
|
||||||
#include "Var.h"
|
#include "Var.h"
|
||||||
|
|
||||||
#if defined(_WINDLL)
|
|
||||||
#define DLL_EXPORT __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define DLL_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*! \brief Enumeration used to return error codes.
|
/*! \brief Enumeration used to return error codes.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -35,7 +29,7 @@ extern "C" {
|
|||||||
* @param line The line(s) to add for input to phreeqc.
|
* @param line The line(s) to add for input to phreeqc.
|
||||||
* @retval IPQ_OK Success
|
* @retval IPQ_OK Success
|
||||||
* @retval IPQ_OUTOFMEMORY Out of memory
|
* @retval IPQ_OUTOFMEMORY Out of memory
|
||||||
* @see OutputLines, RunAccumulated
|
* @see OutputAccumulatedLines, RunAccumulated
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
@ -53,9 +47,9 @@ extern "C" {
|
|||||||
* \include AccumulateLine.c
|
* \include AccumulateLine.c
|
||||||
*
|
*
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetDumpLine_f90 "GetDumpLine"
|
* see \ref GetDumpStringLine_f90 "GetDumpStringLine"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line);
|
IPQ_DLL_EXPORT IPQ_RESULT AccumulateLine(int id, const char *line);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,16 +63,16 @@ extern "C" {
|
|||||||
* Not implemented.
|
* Not implemented.
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int AddError(int id, const char* error_msg);
|
IPQ_DLL_EXPORT int AddError(int id, const char* error_msg);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the accumulated input buffer. Input buffer is accumulated from calls to \ref AccumulateLine.
|
* Clears the accumulated input buffer. Input buffer is accumulated from calls to \ref AccumulateLine.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see AccumulateLine, OutputLines, RunAccumulated
|
* @see AccumulateLine, OutputAccumulatedLines, RunAccumulated
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id);
|
IPQ_DLL_EXPORT IPQ_RESULT ClearAccumulatedLines(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,7 +98,7 @@ extern "C" {
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* \include F90CreateIPhreeqc.f90
|
* \include F90CreateIPhreeqc.f90
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int CreateIPhreeqc(void);
|
IPQ_DLL_EXPORT int CreateIPhreeqc(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +125,7 @@ extern "C" {
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id);
|
IPQ_DLL_EXPORT IPQ_RESULT DestroyIPhreeqc(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -163,7 +157,7 @@ extern "C" {
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* \include F90GetComponent.f90
|
* \include F90GetComponent.f90
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetComponent(int id, int n);
|
IPQ_DLL_EXPORT const char* GetComponent(int id, int n);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -190,7 +184,7 @@ extern "C" {
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetComponent_f90 "GetComponent"
|
* see \ref GetComponent_f90 "GetComponent"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetComponentCount(int id);
|
IPQ_DLL_EXPORT int GetComponentCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -200,13 +194,13 @@ extern "C" {
|
|||||||
* @return A null terminated string containing the given line.
|
* @return A null terminated string containing the given line.
|
||||||
* Returns an empty string if n is out of range.
|
* Returns an empty string if n is out of range.
|
||||||
* @pre \ref SetDumpStringOn must have been set to true (non-zero).
|
* @pre \ref SetDumpStringOn must have been set to true (non-zero).
|
||||||
* @see GetDumpLineCount, SetDumpStringOn
|
* @see GetDumpStringLineCount, SetDumpStringOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* (Note: N is one-based for the Fortran interface.)
|
* (Note: N is one-based for the Fortran interface.)
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE GetDumpLine(ID,N,LINE)
|
* SUBROUTINE GetDumpStringLine(ID,N,LINE)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: N
|
* INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
* CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
* CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||||
@ -215,11 +209,11 @@ extern "C" {
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*
|
*
|
||||||
* \anchor GetDumpLine_f90
|
* \anchor GetDumpStringLine_f90
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* \include F90GetDumpLine.f90
|
* \include F90GetDumpStringLine.f90
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetDumpLine(int id, int n);
|
IPQ_DLL_EXPORT const char* GetDumpStringLine(int id, int n);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -227,43 +221,43 @@ extern "C" {
|
|||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @pre \ref SetDumpStringOn must have been set to true (non-zero).
|
* @pre \ref SetDumpStringOn must have been set to true (non-zero).
|
||||||
* @see GetDumpLine, SetDumpStringOn
|
* @see GetDumpStringLine, SetDumpStringOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetDumpLineCount(ID)
|
* FUNCTION GetDumpStringLineCount(ID)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* INTEGER(KIND=4) :: GetDumpLineCount
|
* INTEGER(KIND=4) :: GetDumpStringLineCount
|
||||||
* END FUNCTION GetDumpLineCount
|
* END FUNCTION GetDumpStringLineCount
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*
|
*
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetDumpLine_f90 "GetDumpLine"
|
* see \ref GetDumpStringLine_f90 "GetDumpStringLine"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetDumpLineCount(int id);
|
IPQ_DLL_EXPORT int GetDumpStringLineCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the dump file switch.
|
* Retrieves the current value of the dump file switch.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return Non-zero if output is written to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file, 0 (zero) otherwise.
|
* @return Non-zero if output is written to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file, 0 (zero) otherwise.
|
||||||
* @see SetDumpOn, GetDumpLineCount, GetDumpLine, GetDumpString
|
* @see SetDumpFileOn, GetDumpStringLineCount, GetDumpStringLine, GetDumpString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetDumpOn(DUMP_ON)
|
* FUNCTION GetDumpFileOn(DUMP_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4) :: GetDumpOn
|
* LOGICAL(KIND=4) :: GetDumpFileOn
|
||||||
* END FUNCTION SetDumpOn
|
* END FUNCTION SetDumpFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetDumpOn(int id);
|
IPQ_DLL_EXPORT int GetDumpFileOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,13 +267,13 @@ extern "C" {
|
|||||||
* @pre \ref SetDumpStringOn must have been set to true (non-zero) in order to recieve <b>DUMP</b> output.
|
* @pre \ref SetDumpStringOn must have been set to true (non-zero) in order to recieve <b>DUMP</b> output.
|
||||||
* @see SetDumpStringOn
|
* @see SetDumpStringOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* Not implemented. (see \ref GetDumpLineCount, \ref GetDumpLine)
|
* Not implemented. (see \ref GetDumpStringLineCount, \ref GetDumpStringLine)
|
||||||
*
|
*
|
||||||
* \anchor GetDumpString_c
|
* \anchor GetDumpString_c
|
||||||
* @par C Example:
|
* @par C Example:
|
||||||
* \include GetDumpString.c
|
* \include GetDumpString.c
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetDumpString(int id);
|
IPQ_DLL_EXPORT const char* GetDumpString(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -299,7 +293,7 @@ extern "C" {
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetDumpStringOn(int id);
|
IPQ_DLL_EXPORT int GetDumpStringOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -307,62 +301,62 @@ extern "C" {
|
|||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @param n The zero-based index of the line to retrieve.
|
* @param n The zero-based index of the line to retrieve.
|
||||||
* @return A null terminated string containing the given error line message.
|
* @return A null terminated string containing the given error line message.
|
||||||
* @see GetErrorLineCount, OutputError
|
* @see GetErrorStringLineCount, OutputErrorString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* (Note: N is one-based for the Fortran interface.)
|
* (Note: N is one-based for the Fortran interface.)
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE GetErrorLine
|
* SUBROUTINE GetErrorStringLine
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: N
|
* INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
* CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
* CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||||
* END SUBROUTINE GetErrorLine
|
* END SUBROUTINE GetErrorStringLine
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetErrorLine(int id, int n);
|
IPQ_DLL_EXPORT const char* GetErrorStringLine(int id, int n);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current error string buffer.
|
* Retrieves the number of lines in the current error string buffer.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @see GetErrorLine, OutputError
|
* @see GetErrorStringLine, OutputErrorString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetErrorLineCount
|
* FUNCTION GetErrorStringLineCount
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* INTEGER(KIND=4) :: GetErrorLineCount
|
* INTEGER(KIND=4) :: GetErrorStringLineCount
|
||||||
* END FUNCTION GetErrorLineCount
|
* END FUNCTION GetErrorStringLineCount
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetErrorLineCount(int id);
|
IPQ_DLL_EXPORT int GetErrorStringLineCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the error file switch.
|
* Retrieves the current value of the error file switch.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return Non-zero if errors are written to the <B><I>phreeqc.err</I></B> file, 0 (zero) otherwise.
|
* @return Non-zero if errors are written to the <B><I>phreeqc.err</I></B> file, 0 (zero) otherwise.
|
||||||
* @see SetErrorOn
|
* @see SetErrorFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetErrorOn(ERROR_ON)
|
* FUNCTION GetErrorFileOn(ERROR_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4) :: GetErrorOn
|
* LOGICAL(KIND=4) :: GetErrorFileOn
|
||||||
* END FUNCTION GetErrorOn
|
* END FUNCTION GetErrorFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetErrorOn(int id);
|
IPQ_DLL_EXPORT int GetErrorFileOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -370,48 +364,48 @@ extern "C" {
|
|||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return A null terminated string containing error messages.
|
* @return A null terminated string containing error messages.
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* Not implemented. (see \ref GetErrorLineCount, \ref GetErrorLine, \ref OutputError)
|
* Not implemented. (see \ref GetErrorStringLineCount, \ref GetErrorStringLine, \ref OutputErrorString)
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetErrorString(int id);
|
IPQ_DLL_EXPORT const char* GetErrorString(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the log file switch.
|
* Retrieves the current value of the log file switch.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return Non-zero if output is written to the <B><I>phreeqc.log</I></B> file, 0 (zero) otherwise.
|
* @return Non-zero if output is written to the <B><I>phreeqc.log</I></B> file, 0 (zero) otherwise.
|
||||||
* @see SetLogOn
|
* @see SetLogFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetLogOn(ID)
|
* FUNCTION GetLogFileOn(ID)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4) :: GetLogOn
|
* LOGICAL(KIND=4) :: GetLogFileOn
|
||||||
* END FUNCTION GetLogOn
|
* END FUNCTION GetLogFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetLogOn(int id);
|
IPQ_DLL_EXPORT int GetLogFileOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the output file switch.
|
* Retrieves the current value of the output file switch.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return Non-zero if output is written to the <B><I>phreeqc.out</I></B> file, 0 (zero) otherwise.
|
* @return Non-zero if output is written to the <B><I>phreeqc.out</I></B> file, 0 (zero) otherwise.
|
||||||
* @see SetOutputOn
|
* @see SetOutputFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetOutputOn(ID)
|
* FUNCTION GetOutputFileOn(ID)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* END FUNCTION GetOutputOn
|
* END FUNCTION GetOutputFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetOutputOn(int id);
|
IPQ_DLL_EXPORT int GetOutputFileOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -431,27 +425,27 @@ extern "C" {
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetSelectedOutputColumnCount(int id);
|
IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the selected-output file switch.
|
* Retrieves the selected-output file switch.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return Non-zero if output is written to the selected-output (<B><I>selected.out</I></B> if unspecified) file, 0 (zero) otherwise.
|
* @return Non-zero if output is written to the selected-output (<B><I>selected.out</I></B> if unspecified) file, 0 (zero) otherwise.
|
||||||
* @see SetSelectedOutputOn
|
* @see SetSelectedOutputFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetSelectedOutputOn(SELECTED_ON)
|
* FUNCTION GetSelectedOutputFileOn(SELECTED_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4) :: GetSelectedOutputOn
|
* LOGICAL(KIND=4) :: GetSelectedOutputFileOn
|
||||||
* END FUNCTION GetSelectedOutputOn
|
* END FUNCTION GetSelectedOutputFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetSelectedOutputOn(int id);
|
IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -471,7 +465,7 @@ extern "C" {
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetSelectedOutputRowCount(int id);
|
IPQ_DLL_EXPORT int GetSelectedOutputRowCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -650,7 +644,7 @@ Headings
|
|||||||
* @param DVALUE Returns the numeric value when (VTYPE=\ref TT_DOUBLE) or (VTYPE=\ref TT_LONG).
|
* @param DVALUE Returns the numeric value when (VTYPE=\ref TT_DOUBLE) or (VTYPE=\ref TT_LONG).
|
||||||
* @param SVALUE Returns the string variable when (VTYPE=\ref TT_STRING). When (VTYPE=\ref TT_DOUBLE) or (VTYPE=\ref TT_LONG) this variable is filled with a string equivalent of DVALUE.
|
* @param SVALUE Returns the string variable when (VTYPE=\ref TT_STRING). When (VTYPE=\ref TT_DOUBLE) or (VTYPE=\ref TT_LONG) this variable is filled with a string equivalent of DVALUE.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR);
|
IPQ_DLL_EXPORT IPQ_RESULT GetSelectedOutputValue(int id, int row, int col, VAR* pVAR);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -658,52 +652,52 @@ Headings
|
|||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @param n The zero-based index of the line to retrieve.
|
* @param n The zero-based index of the line to retrieve.
|
||||||
* @return A null terminated string containing the given warning line message.
|
* @return A null terminated string containing the given warning line message.
|
||||||
* @see GetWarningLineCount, OutputWarning
|
* @see GetWarningStringLineCount, OutputWarningString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* (Note: N is one-based for the Fortran interface.)
|
* (Note: N is one-based for the Fortran interface.)
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE GetWarningLine(ID,N,LINE)
|
* SUBROUTINE GetWarningStringLine(ID,N,LINE)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
||||||
* END SUBROUTINE GetWarningLine
|
* END SUBROUTINE GetWarningStringLine
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetWarningLine(int id, int n);
|
IPQ_DLL_EXPORT const char* GetWarningStringLine(int id, int n);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current warning string buffer.
|
* Retrieves the number of lines in the current warning string buffer.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @see GetWarningLine, OutputWarning
|
* @see GetWarningStringLine, OutputWarningString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION GetWarningLineCount(ID)
|
* FUNCTION GetWarningStringLineCount(ID)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* INTEGER(KIND=4) :: GetWarningLineCount
|
* INTEGER(KIND=4) :: GetWarningStringLineCount
|
||||||
* END FUNCTION GetWarningLineCount
|
* END FUNCTION GetWarningStringLineCount
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int GetWarningLineCount(int id);
|
IPQ_DLL_EXPORT int GetWarningStringLineCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the warning messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
* Retrieves the warning messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return A null terminated string containing warning messages.
|
* @return A null terminated string containing warning messages.
|
||||||
* @see GetWarningLine, GetWarningLineCount, OutputWarning
|
* @see GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* Not implemented. (see \ref GetWarningLineCount, \ref GetWarningLine, \ref OutputWarning)
|
* Not implemented. (see \ref GetWarningStringLineCount, \ref GetWarningStringLine, \ref OutputWarningString)
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT const char* GetWarningString(int id);
|
IPQ_DLL_EXPORT const char* GetWarningString(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -735,7 +729,7 @@ Headings
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int LoadDatabase(int id, const char* filename);
|
IPQ_DLL_EXPORT int LoadDatabase(int id, const char* filename);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -759,20 +753,20 @@ Headings
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int LoadDatabaseString(int id, const char* input);
|
IPQ_DLL_EXPORT int LoadDatabaseString(int id, const char* input);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the error messages normally stored in the <B><I>phreeqc.err</I></B> file to stdout.
|
* Output the error messages normally stored in the <B><I>phreeqc.err</I></B> file to stdout.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @see GetErrorLine, GetErrorLineCount
|
* @see GetErrorStringLine, GetErrorStringLineCount
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE OutputError
|
* SUBROUTINE OutputErrorString
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* END SUBROUTINE OutputError
|
* END SUBROUTINE OutputErrorString
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
@ -781,9 +775,9 @@ Headings
|
|||||||
* see \ref GetComponent_c "GetComponent"
|
* see \ref GetComponent_c "GetComponent"
|
||||||
*
|
*
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetDumpLine_f90 "GetDumpLine"
|
* see \ref GetDumpStringLine_f90 "GetDumpStringLine"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT void OutputError(int id);
|
IPQ_DLL_EXPORT void OutputErrorString(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -794,42 +788,42 @@ Headings
|
|||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE OutputLines
|
* SUBROUTINE OutputAccumulatedLines
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* END SUBROUTINE OutputLines
|
* END SUBROUTINE OutputAccumulatedLines
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*
|
*
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetDumpLine_f90 "GetDumpLine"
|
* see \ref GetDumpStringLine_f90 "GetDumpStringLine"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT void OutputLines(int id);
|
IPQ_DLL_EXPORT void OutputAccumulatedLines(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the warning messages to stdout.
|
* Output the warning messages to stdout.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @see GetWarningLine, GetWarningLineCount
|
* @see GetWarningStringLine, GetWarningStringLineCount
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* SUBROUTINE OutputWarning
|
* SUBROUTINE OutputWarningString
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* END SUBROUTINE OutputWarning
|
* END SUBROUTINE OutputWarningString
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT void OutputWarning(int id);
|
IPQ_DLL_EXPORT void OutputWarningString(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the input buffer as defined by calls to \ref AccumulateLine.
|
* Runs the input buffer as defined by calls to \ref AccumulateLine.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @return The number of errors encountered.
|
* @return The number of errors encountered.
|
||||||
* @see AccumulateLine, OutputLines, RunFile, RunString
|
* @see AccumulateLine, OutputAccumulatedLines, RunFile, RunString
|
||||||
* @remarks
|
* @remarks
|
||||||
* The accumulated input is cleared upon a successful run (no errors).
|
* The accumulated input is cleared upon a successful run (no errors).
|
||||||
* @pre \ref LoadDatabase/\ref LoadDatabaseString must have been called and returned 0 (zero) errors.
|
* @pre \ref LoadDatabase/\ref LoadDatabaseString must have been called and returned 0 (zero) errors.
|
||||||
@ -845,7 +839,7 @@ Headings
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int RunAccumulated(int id);
|
IPQ_DLL_EXPORT int RunAccumulated(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -874,7 +868,7 @@ Headings
|
|||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
* see \ref CreateIPhreeqc_f90 "CreateIPhreeqc"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int RunFile(int id, const char* filename);
|
IPQ_DLL_EXPORT int RunFile(int id, const char* filename);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -897,7 +891,7 @@ Headings
|
|||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT int RunString(int id, const char* input);
|
IPQ_DLL_EXPORT int RunString(int id, const char* input);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -907,20 +901,20 @@ Headings
|
|||||||
* @param dump_on If non-zero turns on output to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
* @param dump_on If non-zero turns on output to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see GetDumpOn, GetDumpString, GetDumpLine, GetDumpLineCount, SetDumpStringOn
|
* @see GetDumpFileOn, GetDumpString, GetDumpStringLine, GetDumpStringLineCount, SetDumpStringOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION SetDumpOn(ID,DUMP_ON)
|
* FUNCTION SetDumpFileOn(ID,DUMP_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: DUMP_ON
|
||||||
* END FUNCTION SetDumpOn
|
* END FUNCTION SetDumpFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetDumpOn(int id, int dump_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetDumpFileOn(int id, int dump_on);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -931,7 +925,7 @@ Headings
|
|||||||
* @param dump_string_on If non-zero captures the output defined by the <B>DUMP</B> keyword into a string buffer.
|
* @param dump_string_on If non-zero captures the output defined by the <B>DUMP</B> keyword into a string buffer.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see GetDumpStringOn, GetDumpString, GetDumpLine, GetDumpLineCount
|
* @see GetDumpStringOn, GetDumpString, GetDumpStringLine, GetDumpStringLineCount
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
@ -948,9 +942,9 @@ Headings
|
|||||||
* see \ref GetDumpString_c "GetDumpString"
|
* see \ref GetDumpString_c "GetDumpString"
|
||||||
*
|
*
|
||||||
* @par Fortran90 Example:
|
* @par Fortran90 Example:
|
||||||
* see \ref GetDumpLine_f90 "GetDumpLine"
|
* see \ref GetDumpStringLine_f90 "GetDumpStringLine"
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetDumpStringOn(int id, int dump_string_on);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -961,20 +955,20 @@ Headings
|
|||||||
* @param error_on If non-zero turns on output to the <B><I>phreeqc.err</I></B> file.
|
* @param error_on If non-zero turns on output to the <B><I>phreeqc.err</I></B> file.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see OutputError, GetErrorLine, GetErrorLineCount
|
* @see OutputErrorString, GetErrorStringLine, GetErrorStringLineCount
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION SetErrorOn(ERROR_ON)
|
* FUNCTION SetErrorFileOn(ERROR_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: ERROR_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: ERROR_ON
|
||||||
* END FUNCTION SetErrorOn
|
* END FUNCTION SetErrorFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetErrorOn(int id, int error_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetErrorFileOn(int id, int error_on);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -985,21 +979,21 @@ Headings
|
|||||||
* @param log_on If non-zero turns on output to the <B><I>phreeqc.log</I></B> file.
|
* @param log_on If non-zero turns on output to the <B><I>phreeqc.log</I></B> file.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see GetLogOn
|
* @see GetLogFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION SetLogOn(ID,LOG_ON)
|
* FUNCTION SetLogFileOn(ID,LOG_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: LOG_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: LOG_ON
|
||||||
* INTEGER(KIND=4) :: SetLogOn
|
* INTEGER(KIND=4) :: SetLogFileOn
|
||||||
* END FUNCTION SetLogOn
|
* END FUNCTION SetLogFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetLogOn(int id, int log_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetLogFileOn(int id, int log_on);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1010,21 +1004,21 @@ Headings
|
|||||||
* @param output_on If non-zero turns on output to the <B><I>phreeqc.out</I></B> file.
|
* @param output_on If non-zero turns on output to the <B><I>phreeqc.out</I></B> file.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see GetOutputOn
|
* @see GetOutputFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION SetOutputOn(ID,OUTPUT_ON)
|
* FUNCTION SetOutputFileOn(ID,OUTPUT_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: OUTPUT_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: OUTPUT_ON
|
||||||
* INTEGER(KIND=4) :: SetOutputOn
|
* INTEGER(KIND=4) :: SetOutputFileOn
|
||||||
* END FUNCTION SetOutputOn
|
* END FUNCTION SetOutputFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetOutputOn(int id, int output_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1034,21 +1028,21 @@ Headings
|
|||||||
* @param sel_on If non-zero turns on output to the <B>SELECTED_OUTPUT</B> (<B><I>selected.out</I></B> if unspecified) file.
|
* @param sel_on If non-zero turns on output to the <B>SELECTED_OUTPUT</B> (<B><I>selected.out</I></B> if unspecified) file.
|
||||||
* @retval IPQ_OK Success.
|
* @retval IPQ_OK Success.
|
||||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
* @see GetSelectedOutputOn
|
* @see GetSelectedOutputFileOn
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
* <CODE>
|
* <CODE>
|
||||||
* <PRE>
|
* <PRE>
|
||||||
* FUNCTION SetSelectedOutputOn(ID,SEL_ON)
|
* FUNCTION SetSelectedOutputFileOn(ID,SEL_ON)
|
||||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
* LOGICAL(KIND=4), INTENT(IN) :: SEL_ON
|
* LOGICAL(KIND=4), INTENT(IN) :: SEL_ON
|
||||||
* INTEGER(KIND=4) :: SetSelectedOutputOn
|
* INTEGER(KIND=4) :: SetSelectedOutputFileOn
|
||||||
* END FUNCTION SetSelectedOutputOn
|
* END FUNCTION SetSelectedOutputFileOn
|
||||||
* </PRE>
|
* </PRE>
|
||||||
* </CODE>
|
* </CODE>
|
||||||
* @endhtmlonly
|
* @endhtmlonly
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT SetSelectedOutputOn(int id, int sel_on);
|
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1063,7 +1057,7 @@ Headings
|
|||||||
* Use of the method is not normally necessary. It is called automatically
|
* Use of the method is not normally necessary. It is called automatically
|
||||||
* before each call to \ref LoadDatabase or \ref LoadDatabaseString.
|
* before each call to \ref LoadDatabase or \ref LoadDatabaseString.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT IPQ_RESULT UnLoadDatabase(int id);
|
IPQ_DLL_EXPORT IPQ_RESULT UnLoadDatabase(int id);
|
||||||
|
|
||||||
|
|
||||||
// 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);
|
// 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);
|
||||||
|
|||||||
@ -80,7 +80,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the accumulated input buffer. Input buffer is accumulated from calls to \ref AccumulateLine.
|
* Clears the accumulated input buffer. Input buffer is accumulated from calls to \ref AccumulateLine.
|
||||||
* @see AccumulateLine, GetAccumulatedLines, OutputLines, RunAccumulated
|
* @see AccumulateLine, GetAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
||||||
*/
|
*/
|
||||||
void ClearAccumulatedLines(void);
|
void ClearAccumulatedLines(void);
|
||||||
|
|
||||||
@ -114,32 +114,32 @@ public:
|
|||||||
* @return A null terminated string containing the given line.
|
* @return A null terminated string containing the given line.
|
||||||
* Returns an empty string if n is out of range.
|
* Returns an empty string if n is out of range.
|
||||||
* @pre \ref SetDumpStringOn must have been set to true.
|
* @pre \ref SetDumpStringOn must have been set to true.
|
||||||
* @see GetDumpLineCount, GetDumpStringOn, GetDumpOn, GetDumpString, SetDumpOn, SetDumpStringOn
|
* @see GetDumpStringLineCount, GetDumpStringOn, GetDumpFileOn, GetDumpString, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetDumpLine(int n);
|
const char* GetDumpStringLine(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current dump string buffer.
|
* Retrieves the number of lines in the current dump string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @pre \ref SetDumpStringOn must have been set to true.
|
* @pre \ref SetDumpStringOn must have been set to true.
|
||||||
* @see GetDumpLine, GetDumpStringOn, GetDumpOn, GetDumpString, SetDumpOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpStringOn, GetDumpFileOn, GetDumpString, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
int GetDumpLineCount(void)const;
|
int GetDumpStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the dump file switch.
|
* Retrieves the current value of the dump file switch.
|
||||||
* @retval true Output is written to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
* @retval true Output is written to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see GetDumpLine, GetDumpLineCount, GetDumpStringOn, GetDumpString, SetDumpOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpStringLineCount, GetDumpStringOn, GetDumpString, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
bool GetDumpOn(void)const;
|
bool GetDumpFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the string buffer containing <b>DUMP</b> output.
|
* Retrieves the string buffer containing <b>DUMP</b> output.
|
||||||
* @return A null terminated string containing <b>DUMP</b> output.
|
* @return A null terminated string containing <b>DUMP</b> output.
|
||||||
* @pre
|
* @pre
|
||||||
* \ref SetDumpStringOn must have been set to true in order to recieve <b>DUMP</b> output.
|
* \ref SetDumpStringOn must have been set to true in order to recieve <b>DUMP</b> output.
|
||||||
* @see GetDumpLine, GetDumpOn, GetDumpLineCount, GetDumpStringOn, SetDumpOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpFileOn, GetDumpStringLineCount, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetDumpString(void);
|
const char* GetDumpString(void);
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ public:
|
|||||||
* Retrieves the current value of the dump string switch.
|
* Retrieves the current value of the dump string switch.
|
||||||
* @retval true Output defined by the <B>DUMP</B> keyword is stored.
|
* @retval true Output defined by the <B>DUMP</B> keyword is stored.
|
||||||
* @retval false No output is stored.
|
* @retval false No output is stored.
|
||||||
* @see GetDumpLine, GetDumpOn, GetDumpString, GetDumpLineCount, SetDumpOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpFileOn, GetDumpString, GetDumpStringLineCount, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
bool GetDumpStringOn(void)const;
|
bool GetDumpStringOn(void)const;
|
||||||
|
|
||||||
@ -155,29 +155,29 @@ public:
|
|||||||
* Retrieves the given error line.
|
* Retrieves the given error line.
|
||||||
* @return A null terminated string containing the given error line message.
|
* @return A null terminated string containing the given error line message.
|
||||||
* @param n The zero-based index of the line to retrieve.
|
* @param n The zero-based index of the line to retrieve.
|
||||||
* @see GetErrorLineCount, OutputError
|
* @see GetErrorStringLineCount, OutputErrorString
|
||||||
*/
|
*/
|
||||||
const char* GetErrorLine(int n);
|
const char* GetErrorStringLine(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current error string buffer.
|
* Retrieves the number of lines in the current error string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @see GetErrorLine, OutputError
|
* @see GetErrorStringLine, OutputErrorString
|
||||||
*/
|
*/
|
||||||
int GetErrorLineCount(void)const;
|
int GetErrorStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the error file switch.
|
* Retrieves the current value of the error file switch.
|
||||||
* @retval true Errors are written to the <B><I>phreeqc.err</I></B> file.
|
* @retval true Errors are written to the <B><I>phreeqc.err</I></B> file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see SetErrorOn
|
* @see SetErrorFileOn
|
||||||
*/
|
*/
|
||||||
bool GetErrorOn(void)const;
|
bool GetErrorFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the error messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
* Retrieves the error messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
||||||
* @return A null terminated string containing error messages.
|
* @return A null terminated string containing error messages.
|
||||||
* @see GetErrorLine, GetErrorLineCount, GetErrorOn, OutputError, SetErrorOn
|
* @see GetErrorStringLine, GetErrorStringLineCount, GetErrorFileOn, OutputErrorString, SetErrorFileOn
|
||||||
*/
|
*/
|
||||||
const char* GetErrorString(void);
|
const char* GetErrorString(void);
|
||||||
|
|
||||||
@ -185,17 +185,17 @@ public:
|
|||||||
* Retrieves the current value of the log file switch.
|
* Retrieves the current value of the log file switch.
|
||||||
* @retval true Output is written to the <B><I>phreeqc.log</I></B> file.
|
* @retval true Output is written to the <B><I>phreeqc.log</I></B> file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see SetLogOn
|
* @see SetLogFileOn
|
||||||
*/
|
*/
|
||||||
bool GetLogOn(void)const;
|
bool GetLogFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the output file switch.
|
* Retrieves the current value of the output file switch.
|
||||||
* @retval true Output is written to the <B><I>phreeqc.out</I></B> file.
|
* @retval true Output is written to the <B><I>phreeqc.out</I></B> file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see SetOutputOn
|
* @see SetOutputFileOn
|
||||||
*/
|
*/
|
||||||
bool GetOutputOn(void)const;
|
bool GetOutputFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of columns currently contained within selected-output buffer.
|
* Returns the number of columns currently contained within selected-output buffer.
|
||||||
@ -208,14 +208,14 @@ public:
|
|||||||
* Retrieves the selected-output file switch.
|
* Retrieves the selected-output file switch.
|
||||||
* @retval true Output is written to the selected-output (<B><I>selected.out</I></B> if unspecified) file.
|
* @retval true Output is written to the selected-output (<B><I>selected.out</I></B> if unspecified) file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see GetSelectedOutputValue, GetSelectedOutputColumnCount, GetSelectedOutputRowCount, SetSelectedOutputOn
|
* @see GetSelectedOutputValue, GetSelectedOutputColumnCount, GetSelectedOutputRowCount, SetSelectedOutputFileOn
|
||||||
*/
|
*/
|
||||||
bool GetSelectedOutputOn(void)const;
|
bool GetSelectedOutputFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows currently contained within the selected-output buffer.
|
* Returns the number of rows currently contained within the selected-output buffer.
|
||||||
* @return The number of rows.
|
* @return The number of rows.
|
||||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputOn, GetSelectedOutputValue, SetSelectedOutputOn
|
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputValue, SetSelectedOutputFileOn
|
||||||
*/
|
*/
|
||||||
int GetSelectedOutputRowCount(void)const;
|
int GetSelectedOutputRowCount(void)const;
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ public:
|
|||||||
* @retval VR_INVALIDCOL The given column is out of range.
|
* @retval VR_INVALIDCOL The given column is out of range.
|
||||||
* @retval VR_OUTOFMEMORY Memory could not be allocated.
|
* @retval VR_OUTOFMEMORY Memory could not be allocated.
|
||||||
* @retval VR_BADINSTANCE The given id is invalid.
|
* @retval VR_BADINSTANCE The given id is invalid.
|
||||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputOn, GetSelectedOutputRowCount, SetSelectedOutputOn
|
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputRowCount, SetSelectedOutputFileOn
|
||||||
* @remarks
|
* @remarks
|
||||||
* Row 0 contains the column headings to the selected_ouput.
|
* Row 0 contains the column headings to the selected_ouput.
|
||||||
* @par Examples:
|
* @par Examples:
|
||||||
@ -377,21 +377,21 @@ public:
|
|||||||
* Retrieves the given warning line.
|
* Retrieves the given warning line.
|
||||||
* @param n The zero-based index of the line to retrieve.
|
* @param n The zero-based index of the line to retrieve.
|
||||||
* @return A null terminated string containing the given warning line message.
|
* @return A null terminated string containing the given warning line message.
|
||||||
* @see GetWarningLineCount, OutputWarning
|
* @see GetWarningStringLineCount, OutputWarningString
|
||||||
*/
|
*/
|
||||||
const char* GetWarningLine(int n);
|
const char* GetWarningStringLine(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current warning string buffer.
|
* Retrieves the number of lines in the current warning string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @see GetWarningLine, GetWarningString, OutputWarning
|
* @see GetWarningStringLine, GetWarningString, OutputWarningString
|
||||||
*/
|
*/
|
||||||
int GetWarningLineCount(void)const;
|
int GetWarningStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the warning messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
* Retrieves the warning messages from the last call to \ref RunAccumulated, \ref RunFile, \ref RunString, \ref LoadDatabase, or \ref LoadDatabaseString.
|
||||||
* @return A null terminated string containing warning messages.
|
* @return A null terminated string containing warning messages.
|
||||||
* @see GetWarningLine, GetWarningLineCount, OutputWarning
|
* @see GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||||
*/
|
*/
|
||||||
const char* GetWarningString(void);
|
const char* GetWarningString(void);
|
||||||
|
|
||||||
@ -426,26 +426,26 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the error messages normally stored in the <B><I>phreeqc.err</I></B> file to stdout.
|
* Output the error messages normally stored in the <B><I>phreeqc.err</I></B> file to stdout.
|
||||||
* @see GetErrorLine, GetErrorLineCount, GetErrorOn, SetErrorOn
|
* @see GetErrorStringLine, GetErrorStringLineCount, GetErrorFileOn, SetErrorFileOn
|
||||||
*/
|
*/
|
||||||
void OutputError(void);
|
void OutputErrorString(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the accumulated input buffer to stdout. The input buffer can be run with a call to \ref RunAccumulated.
|
* Output the accumulated input buffer to stdout. The input buffer can be run with a call to \ref RunAccumulated.
|
||||||
* @see AccumulateLine, ClearAccumulatedLines, RunAccumulated
|
* @see AccumulateLine, ClearAccumulatedLines, RunAccumulated
|
||||||
*/
|
*/
|
||||||
void OutputLines(void);
|
void OutputAccumulatedLines(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the warning messages to stdout.
|
* Output the warning messages to stdout.
|
||||||
* @see GetWarningLine, GetWarningLineCount, GetWarningString
|
* @see GetWarningStringLine, GetWarningStringLineCount, GetWarningString
|
||||||
*/
|
*/
|
||||||
void OutputWarning(void);
|
void OutputWarningString(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the input buffer as defined by calls to \ref AccumulateLine.
|
* Runs the input buffer as defined by calls to \ref AccumulateLine.
|
||||||
* @return The number of errors encountered.
|
* @return The number of errors encountered.
|
||||||
* @see AccumulateLine, ClearAccumulatedLines, OutputLines, RunFile, RunString
|
* @see AccumulateLine, ClearAccumulatedLines, OutputAccumulatedLines, RunFile, RunString
|
||||||
* @remarks
|
* @remarks
|
||||||
* The accumulated input is cleared upon a successful run (no errors).
|
* The accumulated input is cleared upon a successful run (no errors).
|
||||||
* @pre
|
* @pre
|
||||||
@ -477,15 +477,15 @@ public:
|
|||||||
* Sets the dump file switch on or off. This switch controls whether or not phreeqc writes to the dump file.
|
* Sets the dump file switch on or off. This switch controls whether or not phreeqc writes to the dump file.
|
||||||
* The initial setting is false.
|
* The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
* @param bValue If true, turns on output to the <B>DUMP</B> (<B><I>dump.out</I></B> if unspecified) file.
|
||||||
* @see GetDumpLine, GetDumpLineCount, GetDumpOn, GetDumpString, GetDumpStringOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpStringLineCount, GetDumpFileOn, GetDumpString, GetDumpStringOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
void SetDumpOn(bool bValue);
|
void SetDumpFileOn(bool bValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the dump string switch on or off. This switch controls whether or not the data normally sent
|
* Sets the dump string switch on or off. This switch controls whether or not the data normally sent
|
||||||
* to the dump file are stored in a buffer for retrieval. The initial setting is false.
|
* to the dump file are stored in a buffer for retrieval. The initial setting is false.
|
||||||
* @param bValue If true, captures the output defined by the <B>DUMP</B> keyword into a string buffer.
|
* @param bValue If true, captures the output defined by the <B>DUMP</B> keyword into a string buffer.
|
||||||
* @see GetDumpLine, GetDumpLineCount, GetDumpString, GetDumpStringOn
|
* @see GetDumpStringLine, GetDumpStringLineCount, GetDumpString, GetDumpStringOn
|
||||||
*/
|
*/
|
||||||
void SetDumpStringOn(bool bValue);
|
void SetDumpStringOn(bool bValue);
|
||||||
|
|
||||||
@ -493,34 +493,34 @@ public:
|
|||||||
* Sets the error file switch on or off. This switch controls whether or not
|
* Sets the error file switch on or off. This switch controls whether or not
|
||||||
* error messages are written to the error file. The initial setting is false.
|
* error messages are written to the error file. The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the <B><I>phreeqc.err</I></B> file.
|
* @param bValue If true, turns on output to the <B><I>phreeqc.err</I></B> file.
|
||||||
* @see GetErrorLine, GetErrorLineCount, GetErrorOn, OutputError
|
* @see GetErrorStringLine, GetErrorStringLineCount, GetErrorFileOn, OutputErrorString
|
||||||
*/
|
*/
|
||||||
void SetErrorOn(bool bValue);
|
void SetErrorFileOn(bool bValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the log file switch on or off. This switch controls whether or not phreeqc
|
* Sets the log file switch on or off. This switch controls whether or not phreeqc
|
||||||
* writes log messages to the log file. The initial setting is false.
|
* writes log messages to the log file. The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the <B><I>phreeqc.log</I></B> file.
|
* @param bValue If true, turns on output to the <B><I>phreeqc.log</I></B> file.
|
||||||
* @see GetLogOn
|
* @see GetLogFileOn
|
||||||
*/
|
*/
|
||||||
void SetLogOn(bool bValue);
|
void SetLogFileOn(bool bValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the output file switch on or off. This switch controls whether or not phreeqc
|
* Sets the output file switch on or off. This switch controls whether or not phreeqc
|
||||||
* writes to the output file. This is the output that is normally generated
|
* writes to the output file. This is the output that is normally generated
|
||||||
* when phreeqc is run. The initial setting is false.
|
* when phreeqc is run. The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the <B><I>phreeqc.out</I></B> file.
|
* @param bValue If true, turns on output to the <B><I>phreeqc.out</I></B> file.
|
||||||
* @see GetOutputOn
|
* @see GetOutputFileOn
|
||||||
*/
|
*/
|
||||||
void SetOutputOn(bool bValue);
|
void SetOutputFileOn(bool bValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the selected-output file switch on or off. This switch controls whether or not phreeqc writes output to
|
* Sets the selected-output file switch on or off. This switch controls whether or not phreeqc writes output to
|
||||||
* the selected-output file. The initial setting is false.
|
* the selected-output file. The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the <B>SELECTED_OUTPUT</B> (<B><I>selected.out</I></B> if unspecified) file.
|
* @param bValue If true, turns on output to the <B>SELECTED_OUTPUT</B> (<B><I>selected.out</I></B> if unspecified) file.
|
||||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputOn, GetSelectedOutputRowCount, GetSelectedOutputValue
|
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputRowCount, GetSelectedOutputValue
|
||||||
*/
|
*/
|
||||||
void SetSelectedOutputOn(bool bValue);
|
void SetSelectedOutputFileOn(bool bValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unloads the database currently loaded into phreeqc. In addition, all
|
* Unloads the database currently loaded into phreeqc. In addition, all
|
||||||
@ -553,6 +553,7 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool DatabaseLoaded;
|
bool DatabaseLoaded;
|
||||||
|
bool ClearAccumulatedLinesOnNextAccumulate;
|
||||||
bool SelectedOutputOn;
|
bool SelectedOutputOn;
|
||||||
bool OutputOn;
|
bool OutputOn;
|
||||||
bool LogOn;
|
bool LogOn;
|
||||||
|
|||||||
@ -7,9 +7,9 @@
|
|||||||
#define __VAR_H_INC
|
#define __VAR_H_INC
|
||||||
|
|
||||||
#if defined(_WINDLL)
|
#if defined(_WINDLL)
|
||||||
#define DLL_EXPORT __declspec(dllexport)
|
#define IPQ_DLL_EXPORT __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define DLL_EXPORT
|
#define IPQ_DLL_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! \brief Enumeration used to determine the type of data stored in a VAR.
|
/*! \brief Enumeration used to determine the type of data stored in a VAR.
|
||||||
@ -53,14 +53,14 @@ extern "C" {
|
|||||||
/** Initializes a VAR.
|
/** Initializes a VAR.
|
||||||
* @param pvar Pointer to the VAR that will be initialized.
|
* @param pvar Pointer to the VAR that will be initialized.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT void VarInit(VAR* pvar);
|
IPQ_DLL_EXPORT void VarInit(VAR* pvar);
|
||||||
|
|
||||||
/** Clears a VAR.
|
/** Clears a VAR.
|
||||||
* @param pvar Pointer to the VAR that will be freed and initialized.
|
* @param pvar Pointer to the VAR that will be freed and initialized.
|
||||||
* @retval VR_OK Success.
|
* @retval VR_OK Success.
|
||||||
* @retval VR_BADVARTYPE The \c VAR was invalid (probably uninitialized).
|
* @retval VR_BADVARTYPE The \c VAR was invalid (probably uninitialized).
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT VRESULT VarClear(VAR* pvar);
|
IPQ_DLL_EXPORT VRESULT VarClear(VAR* pvar);
|
||||||
|
|
||||||
/** Frees the destination VAR and makes a copy of the source VAR.
|
/** Frees the destination VAR and makes a copy of the source VAR.
|
||||||
* @param pvarDest Pointer to the VAR to receive the copy.
|
* @param pvarDest Pointer to the VAR to receive the copy.
|
||||||
@ -70,19 +70,19 @@ DLL_EXPORT VRESULT VarClear(VAR* pvar);
|
|||||||
* @retval VR_OUTOFMEMORY Memory could not be allocated for the copy.
|
* @retval VR_OUTOFMEMORY Memory could not be allocated for the copy.
|
||||||
* @return The return value is one of the following.
|
* @return The return value is one of the following.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT VRESULT VarCopy(VAR* pvarDest, const VAR* pvarSrc);
|
IPQ_DLL_EXPORT VRESULT VarCopy(VAR* pvarDest, const VAR* pvarSrc);
|
||||||
|
|
||||||
|
|
||||||
/** Allocates a new string for use in a VAR and copies the passed string into it.
|
/** Allocates a new string for use in a VAR and copies the passed string into it.
|
||||||
* @param pSrc Pointer to the VAR that will be initialized.
|
* @param pSrc Pointer to the VAR that will be initialized.
|
||||||
* @return A pointer to the string on success NULL otherwise.
|
* @return A pointer to the string on success NULL otherwise.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT char* VarAllocString(const char* pSrc);
|
IPQ_DLL_EXPORT char* VarAllocString(const char* pSrc);
|
||||||
|
|
||||||
/** Frees a string allocated using VarAllocString.
|
/** Frees a string allocated using VarAllocString.
|
||||||
* @param pSrc Pointer to the string to be freed.
|
* @param pSrc Pointer to the string to be freed.
|
||||||
*/
|
*/
|
||||||
DLL_EXPORT void VarFreeString(char* pSrc);
|
IPQ_DLL_EXPORT void VarFreeString(char* pSrc);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ int istream_getc(void *cookie)
|
|||||||
|
|
||||||
IPhreeqc::IPhreeqc(void)
|
IPhreeqc::IPhreeqc(void)
|
||||||
: DatabaseLoaded(false)
|
: DatabaseLoaded(false)
|
||||||
|
, ClearAccumulatedLinesOnNextAccumulate(false)
|
||||||
, SelectedOutputOn(false)
|
, SelectedOutputOn(false)
|
||||||
, OutputOn(false)
|
, OutputOn(false)
|
||||||
, LogOn(false)
|
, LogOn(false)
|
||||||
@ -282,17 +283,17 @@ const std::string& IPhreeqc::GetAccumulatedLines(void)
|
|||||||
return this->StringInput;
|
return this->StringInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::OutputError(void)
|
void IPhreeqc::OutputErrorString(void)
|
||||||
{
|
{
|
||||||
std::cout << this->GetErrorString() << std::endl;
|
std::cout << this->GetErrorString() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::OutputWarning(void)
|
void IPhreeqc::OutputWarningString(void)
|
||||||
{
|
{
|
||||||
std::cout << this->GetWarningString() << std::endl;
|
std::cout << this->GetWarningString() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::OutputLines(void)
|
void IPhreeqc::OutputAccumulatedLines(void)
|
||||||
{
|
{
|
||||||
std::cout << this->StringInput.c_str() << std::endl;
|
std::cout << this->StringInput.c_str() << std::endl;
|
||||||
}
|
}
|
||||||
@ -418,42 +419,42 @@ void IPhreeqc::UnLoadDatabase(void)
|
|||||||
this->PhreeqcPtr->input_error = 0;
|
this->PhreeqcPtr->input_error = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPhreeqc::GetOutputOn(void)const
|
bool IPhreeqc::GetOutputFileOn(void)const
|
||||||
{
|
{
|
||||||
return this->OutputOn;
|
return this->OutputOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetOutputOn(bool bValue)
|
void IPhreeqc::SetOutputFileOn(bool bValue)
|
||||||
{
|
{
|
||||||
this->OutputOn = bValue;
|
this->OutputOn = bValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPhreeqc::GetSelectedOutputOn(void)const
|
bool IPhreeqc::GetSelectedOutputFileOn(void)const
|
||||||
{
|
{
|
||||||
return this->SelectedOutputOn;
|
return this->SelectedOutputOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetSelectedOutputOn(bool bValue)
|
void IPhreeqc::SetSelectedOutputFileOn(bool bValue)
|
||||||
{
|
{
|
||||||
this->SelectedOutputOn = bValue;
|
this->SelectedOutputOn = bValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPhreeqc::GetLogOn(void)const
|
bool IPhreeqc::GetLogFileOn(void)const
|
||||||
{
|
{
|
||||||
return this->LogOn;
|
return this->LogOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetLogOn(bool bValue)
|
void IPhreeqc::SetLogFileOn(bool bValue)
|
||||||
{
|
{
|
||||||
this->LogOn = bValue;
|
this->LogOn = bValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPhreeqc::GetDumpOn(void)const
|
bool IPhreeqc::GetDumpFileOn(void)const
|
||||||
{
|
{
|
||||||
return this->DumpOn;
|
return this->DumpOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetDumpOn(bool bValue)
|
void IPhreeqc::SetDumpFileOn(bool bValue)
|
||||||
{
|
{
|
||||||
this->DumpOn = bValue;
|
this->DumpOn = bValue;
|
||||||
}
|
}
|
||||||
@ -468,12 +469,12 @@ void IPhreeqc::SetDumpStringOn(bool bValue)
|
|||||||
this->DumpStringOn = bValue;
|
this->DumpStringOn = bValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IPhreeqc::GetErrorOn(void)const
|
bool IPhreeqc::GetErrorFileOn(void)const
|
||||||
{
|
{
|
||||||
return this->ErrorOn;
|
return this->ErrorOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetErrorOn(bool bValue)
|
void IPhreeqc::SetErrorFileOn(bool bValue)
|
||||||
{
|
{
|
||||||
this->ErrorOn = bValue;
|
this->ErrorOn = bValue;
|
||||||
}
|
}
|
||||||
@ -1025,6 +1026,12 @@ VRESULT IPhreeqc::AccumulateLine(const char *line)
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (this->ClearAccumulatedLinesOnNextAccumulate)
|
||||||
|
{
|
||||||
|
this->ClearAccumulatedLines();
|
||||||
|
this->ClearAccumulatedLinesOnNextAccumulate = false;
|
||||||
|
}
|
||||||
|
|
||||||
this->ErrorReporter->Clear();
|
this->ErrorReporter->Clear();
|
||||||
this->WarningReporter->Clear();
|
this->WarningReporter->Clear();
|
||||||
this->StringInput.append(line);
|
this->StringInput.append(line);
|
||||||
@ -1071,11 +1078,7 @@ int IPhreeqc::RunAccumulated(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->PhreeqcPtr->input_error == 0)
|
this->ClearAccumulatedLinesOnNextAccumulate = true;
|
||||||
{
|
|
||||||
this->ClearAccumulatedLines();
|
|
||||||
}
|
|
||||||
|
|
||||||
this->PhreeqcPtr->close_output_files();
|
this->PhreeqcPtr->close_output_files();
|
||||||
this->update_errors();
|
this->update_errors();
|
||||||
|
|
||||||
@ -1214,45 +1217,45 @@ VRESULT IPhreeqc::GetSelectedOutputValue(int row, int col, VAR* pVAR)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IPhreeqc::GetDumpLineCount(void)const
|
int IPhreeqc::GetDumpStringLineCount(void)const
|
||||||
{
|
{
|
||||||
return (int)this->DumpLines.size();
|
return (int)this->DumpLines.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetDumpLine(int n)
|
const char* IPhreeqc::GetDumpStringLine(int n)
|
||||||
{
|
{
|
||||||
static const char empty[] = "";
|
static const char empty[] = "";
|
||||||
if (n < 0 || n >= this->GetDumpLineCount())
|
if (n < 0 || n >= this->GetDumpStringLineCount())
|
||||||
{
|
{
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
return this->DumpLines[n].c_str();
|
return this->DumpLines[n].c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int IPhreeqc::GetErrorLineCount(void)const
|
int IPhreeqc::GetErrorStringLineCount(void)const
|
||||||
{
|
{
|
||||||
return (int)this->ErrorLines.size();
|
return (int)this->ErrorLines.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetErrorLine(int n)
|
const char* IPhreeqc::GetErrorStringLine(int n)
|
||||||
{
|
{
|
||||||
static const char empty[] = "";
|
static const char empty[] = "";
|
||||||
if (n < 0 || n >= this->GetErrorLineCount())
|
if (n < 0 || n >= this->GetErrorStringLineCount())
|
||||||
{
|
{
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
return this->ErrorLines[n].c_str();
|
return this->ErrorLines[n].c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
int IPhreeqc::GetWarningLineCount(void)const
|
int IPhreeqc::GetWarningStringLineCount(void)const
|
||||||
{
|
{
|
||||||
return (int)this->WarningLines.size();
|
return (int)this->WarningLines.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetWarningLine(int n)
|
const char* IPhreeqc::GetWarningStringLine(int n)
|
||||||
{
|
{
|
||||||
static const char empty[] = "";
|
static const char empty[] = "";
|
||||||
if (n < 0 || n >= this->GetWarningLineCount())
|
if (n < 0 || n >= this->GetWarningStringLineCount())
|
||||||
{
|
{
|
||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
|
|||||||
198
src/IPhreeqcF.f
198
src/IPhreeqcF.f
@ -49,35 +49,35 @@
|
|||||||
GetComponentCount = GetComponentCountF(ID)
|
GetComponentCount = GetComponentCountF(ID)
|
||||||
END FUNCTION GetComponentCount
|
END FUNCTION GetComponentCount
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetDumpLine(ID,N,LINE)
|
FUNCTION GetDumpStringLine(ID,N,LINE)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: N
|
INTEGER(KIND=4) :: N
|
||||||
CHARACTER(LEN=*) :: LINE
|
CHARACTER(LEN=*) :: LINE
|
||||||
INTEGER(KIND=4) :: GetDumpLine
|
INTEGER(KIND=4) :: GetDumpStringLine
|
||||||
INTEGER(KIND=4) :: GetDumpLineF
|
INTEGER(KIND=4) :: GetDumpStringLineF
|
||||||
GetDumpLine = GetDumpLineF(ID,N,LINE)
|
GetDumpStringLine = GetDumpStringLineF(ID,N,LINE)
|
||||||
END FUNCTION GetDumpLine
|
END FUNCTION GetDumpStringLine
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetDumpLineCount(ID)
|
FUNCTION GetDumpStringLineCount(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: GetDumpLineCount
|
INTEGER(KIND=4) :: GetDumpStringLineCount
|
||||||
INTEGER(KIND=4) :: GetDumpLineCountF
|
INTEGER(KIND=4) :: GetDumpStringLineCountF
|
||||||
GetDumpLineCount = GetDumpLineCountF(ID)
|
GetDumpStringLineCount = GetDumpStringLineCountF(ID)
|
||||||
END FUNCTION GetDumpLineCount
|
END FUNCTION GetDumpStringLineCount
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetDumpOn(ID)
|
FUNCTION GetDumpFileOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: GetDumpOn
|
LOGICAL(KIND=4) :: GetDumpFileOn
|
||||||
INTEGER(KIND=4) :: GetDumpOnF
|
INTEGER(KIND=4) :: GetDumpFileOnF
|
||||||
IF (GetDumpOnF(ID).EQ.0) THEN
|
IF (GetDumpFileOnF(ID).EQ.0) THEN
|
||||||
GetDumpOn = .FALSE.
|
GetDumpFileOn = .FALSE.
|
||||||
ELSE
|
ELSE
|
||||||
GetDumpOn = .TRUE.
|
GetDumpFileOn = .TRUE.
|
||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetDumpOn
|
END FUNCTION GetDumpFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetDumpStringOn(ID)
|
FUNCTION GetDumpStringOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
@ -91,59 +91,59 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetDumpStringOn
|
END FUNCTION GetDumpStringOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetErrorLine(ID,N,LINE)
|
FUNCTION GetErrorStringLine(ID,N,LINE)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: N
|
INTEGER(KIND=4) :: N
|
||||||
CHARACTER(LEN=*) :: LINE
|
CHARACTER(LEN=*) :: LINE
|
||||||
INTEGER(KIND=4) :: GetErrorLine
|
INTEGER(KIND=4) :: GetErrorStringLine
|
||||||
INTEGER(KIND=4) :: GetErrorLineF
|
INTEGER(KIND=4) :: GetErrorStringLineF
|
||||||
GetErrorLine = GetErrorLineF(ID,N,LINE)
|
GetErrorStringLine = GetErrorStringLineF(ID,N,LINE)
|
||||||
END FUNCTION GetErrorLine
|
END FUNCTION GetErrorStringLine
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetErrorLineCount(ID)
|
FUNCTION GetErrorStringLineCount(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: GetErrorLineCount
|
INTEGER(KIND=4) :: GetErrorStringLineCount
|
||||||
INTEGER(KIND=4) :: GetErrorLineCountF
|
INTEGER(KIND=4) :: GetErrorStringLineCountF
|
||||||
GetErrorLineCount = GetErrorLineCountF(ID)
|
GetErrorStringLineCount = GetErrorStringLineCountF(ID)
|
||||||
END FUNCTION GetErrorLineCount
|
END FUNCTION GetErrorStringLineCount
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetErrorOn(ID)
|
FUNCTION GetErrorFileOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: GetErrorOn
|
LOGICAL(KIND=4) :: GetErrorFileOn
|
||||||
INTEGER(KIND=4) :: GetErrorOnF
|
INTEGER(KIND=4) :: GetErrorFileOnF
|
||||||
IF (GetErrorOnF(ID).EQ.0) THEN
|
IF (GetErrorFileOnF(ID).EQ.0) THEN
|
||||||
GetErrorOn = .FALSE.
|
GetErrorFileOn = .FALSE.
|
||||||
ELSE
|
ELSE
|
||||||
GetErrorOn = .TRUE.
|
GetErrorFileOn = .TRUE.
|
||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetErrorOn
|
END FUNCTION GetErrorFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetLogOn(ID)
|
FUNCTION GetLogFileOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: GetLogOn
|
LOGICAL(KIND=4) :: GetLogFileOn
|
||||||
INTEGER(KIND=4) :: GetLogOnF
|
INTEGER(KIND=4) :: GetLogFileOnF
|
||||||
IF (GetLogOnF(ID).EQ.0) THEN
|
IF (GetLogFileOnF(ID).EQ.0) THEN
|
||||||
GetLogOn = .FALSE.
|
GetLogFileOn = .FALSE.
|
||||||
ELSE
|
ELSE
|
||||||
GetLogOn = .TRUE.
|
GetLogFileOn = .TRUE.
|
||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetLogOn
|
END FUNCTION GetLogFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetOutputOn(ID)
|
FUNCTION GetOutputFileOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: GetOutputOn
|
LOGICAL(KIND=4) :: GetOutputFileOn
|
||||||
INTEGER(KIND=4) :: GetOutputOnF
|
INTEGER(KIND=4) :: GetOutputFileOnF
|
||||||
IF (GetOutputOnF(ID).EQ.0) THEN
|
IF (GetOutputFileOnF(ID).EQ.0) THEN
|
||||||
GetOutputOn = .FALSE.
|
GetOutputFileOn = .FALSE.
|
||||||
ELSE
|
ELSE
|
||||||
GetOutputOn = .TRUE.
|
GetOutputFileOn = .TRUE.
|
||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetOutputOn
|
END FUNCTION GetOutputFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetSelectedOutputColumnCount(ID)
|
FUNCTION GetSelectedOutputColumnCount(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
@ -153,17 +153,17 @@
|
|||||||
GetSelectedOutputColumnCount = GetSelectedOutputColumnCountF(ID)
|
GetSelectedOutputColumnCount = GetSelectedOutputColumnCountF(ID)
|
||||||
END FUNCTION GetSelectedOutputColumnCount
|
END FUNCTION GetSelectedOutputColumnCount
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetSelectedOutputOn(ID)
|
FUNCTION GetSelectedOutputFileOn(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: GetSelectedOutputOn
|
LOGICAL(KIND=4) :: GetSelectedOutputFileOn
|
||||||
INTEGER(KIND=4) :: GetSelectedOutputOnF
|
INTEGER(KIND=4) :: GetSelectedOutputFileOnF
|
||||||
IF (GetSelectedOutputOnF(ID).EQ.0) THEN
|
IF (GetSelectedOutputFileOnF(ID).EQ.0) THEN
|
||||||
GetSelectedOutputOn = .FALSE.
|
GetSelectedOutputFileOn = .FALSE.
|
||||||
ELSE
|
ELSE
|
||||||
GetSelectedOutputOn = .TRUE.
|
GetSelectedOutputFileOn = .TRUE.
|
||||||
ENDIF
|
ENDIF
|
||||||
END FUNCTION GetSelectedOutputOn
|
END FUNCTION GetSelectedOutputFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetSelectedOutputRowCount(ID)
|
FUNCTION GetSelectedOutputRowCount(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
@ -187,23 +187,23 @@
|
|||||||
& COL,VTYPE,DVALUE,SVALUE)
|
& COL,VTYPE,DVALUE,SVALUE)
|
||||||
END FUNCTION GetSelectedOutputValue
|
END FUNCTION GetSelectedOutputValue
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetWarningLine(ID,N,LINE)
|
FUNCTION GetWarningStringLine(ID,N,LINE)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: N
|
INTEGER(KIND=4) :: N
|
||||||
CHARACTER(LEN=*) :: LINE
|
CHARACTER(LEN=*) :: LINE
|
||||||
INTEGER(KIND=4) :: GetWarningLine
|
INTEGER(KIND=4) :: GetWarningStringLine
|
||||||
INTEGER(KIND=4) :: GetWarningLineF
|
INTEGER(KIND=4) :: GetWarningStringLineF
|
||||||
GetWarningLine = GetWarningLineF(ID,N,LINE)
|
GetWarningStringLine = GetWarningStringLineF(ID,N,LINE)
|
||||||
END FUNCTION GetWarningLine
|
END FUNCTION GetWarningStringLine
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION GetWarningLineCount(ID)
|
FUNCTION GetWarningStringLineCount(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
INTEGER(KIND=4) :: GetWarningLineCount
|
INTEGER(KIND=4) :: GetWarningStringLineCount
|
||||||
INTEGER(KIND=4) :: GetWarningLineCountF
|
INTEGER(KIND=4) :: GetWarningStringLineCountF
|
||||||
GetWarningLineCount = GetWarningLineCountF(ID)
|
GetWarningStringLineCount = GetWarningStringLineCountF(ID)
|
||||||
END FUNCTION GetWarningLineCount
|
END FUNCTION GetWarningStringLineCount
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION LoadDatabase(ID,FILENAME)
|
FUNCTION LoadDatabase(ID,FILENAME)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
@ -223,68 +223,68 @@
|
|||||||
LoadDatabaseString = LoadDatabaseStringF(ID,INPUT)
|
LoadDatabaseString = LoadDatabaseStringF(ID,INPUT)
|
||||||
END FUNCTION LoadDatabaseString
|
END FUNCTION LoadDatabaseString
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
SUBROUTINE OutputError(ID)
|
SUBROUTINE OutputErrorString(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
CALL OutputErrorF(ID)
|
CALL OutputErrorStringF(ID)
|
||||||
END SUBROUTINE OutputError
|
END SUBROUTINE OutputErrorString
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
SUBROUTINE OutputLines(ID)
|
SUBROUTINE OutputAccumulatedLines(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
CALL OutputLinesF(ID)
|
CALL OutputAccumulatedLinesF(ID)
|
||||||
END SUBROUTINE OutputLines
|
END SUBROUTINE OutputAccumulatedLines
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
SUBROUTINE OutputWarning(ID)
|
SUBROUTINE OutputWarningString(ID)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
CALL OutputWarningF(ID)
|
CALL OutputWarningStringF(ID)
|
||||||
END SUBROUTINE OutputWarning
|
END SUBROUTINE OutputWarningString
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetSelectedOutputOn(ID,SELECTED_ON)
|
FUNCTION SetSelectedOutputFileOn(ID,SELECTED_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: SELECTED_ON
|
LOGICAL(KIND=4) :: SELECTED_ON
|
||||||
INTEGER(KIND=4) :: SetSelectedOutputOn
|
INTEGER(KIND=4) :: SetSelectedOutputFileOn
|
||||||
INTEGER(KIND=4) :: SetSelectedOutputOnF
|
INTEGER(KIND=4) :: SetSelOutFileOnF
|
||||||
SetSelectedOutputOn = SetSelectedOutputOnF(ID,SELECTED_ON)
|
SetSelectedOutputFileOn = SetSelOutFileOnF(ID,SELECTED_ON)
|
||||||
END FUNCTION SetSelectedOutputOn
|
END FUNCTION SetSelectedOutputFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetOutputOn(ID,OUTPUT_ON)
|
FUNCTION SetOutputFileOn(ID,OUTPUT_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: OUTPUT_ON
|
LOGICAL(KIND=4) :: OUTPUT_ON
|
||||||
INTEGER(KIND=4) :: SetOutputOn
|
INTEGER(KIND=4) :: SetOutputFileOn
|
||||||
INTEGER(KIND=4) :: SetOutputOnF
|
INTEGER(KIND=4) :: SetOutputFileOnF
|
||||||
SetOutputOn = SetOutputOnF(ID,OUTPUT_ON)
|
SetOutputFileOn = SetOutputFileOnF(ID,OUTPUT_ON)
|
||||||
END FUNCTION SetOutputOn
|
END FUNCTION SetOutputFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetErrorOn(ID,ERROR_ON)
|
FUNCTION SetErrorFileOn(ID,ERROR_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: ERROR_ON
|
LOGICAL(KIND=4) :: ERROR_ON
|
||||||
INTEGER(KIND=4) :: SetErrorOn
|
INTEGER(KIND=4) :: SetErrorFileOn
|
||||||
INTEGER(KIND=4) :: SetErrorOnF
|
INTEGER(KIND=4) :: SetErrorFileOnF
|
||||||
SetErrorOn = SetErrorOnF(ID,ERROR_ON)
|
SetErrorFileOn = SetErrorFileOnF(ID,ERROR_ON)
|
||||||
END FUNCTION SetErrorOn
|
END FUNCTION SetErrorFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetLogOn(ID,LOG_ON)
|
FUNCTION SetLogFileOn(ID,LOG_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: LOG_ON
|
LOGICAL(KIND=4) :: LOG_ON
|
||||||
INTEGER(KIND=4) :: SetLogOn
|
INTEGER(KIND=4) :: SetLogFileOn
|
||||||
INTEGER(KIND=4) :: SetLogOnF
|
INTEGER(KIND=4) :: SetLogFileOnF
|
||||||
SetLogOn = SetLogOnF(ID,LOG_ON)
|
SetLogFileOn = SetLogFileOnF(ID,LOG_ON)
|
||||||
END FUNCTION SetLogOn
|
END FUNCTION SetLogFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetDumpOn(ID,DUMP_ON)
|
FUNCTION SetDumpFileOn(ID,DUMP_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER(KIND=4) :: ID
|
INTEGER(KIND=4) :: ID
|
||||||
LOGICAL(KIND=4) :: DUMP_ON
|
LOGICAL(KIND=4) :: DUMP_ON
|
||||||
INTEGER(KIND=4) :: SetDumpOn
|
INTEGER(KIND=4) :: SetDumpFileOn
|
||||||
INTEGER(KIND=4) :: SetDumpOnF
|
INTEGER(KIND=4) :: SetDumpFileOnF
|
||||||
SetDumpOn = SetDumpOnF(ID,DUMP_ON)
|
SetDumpFileOn = SetDumpFileOnF(ID,DUMP_ON)
|
||||||
END FUNCTION SetDumpOn
|
END FUNCTION SetDumpFileOn
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
FUNCTION SetDumpStringOn(ID,DUMP_STRING_ON)
|
FUNCTION SetDumpStringOn(ID,DUMP_STRING_ON)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|||||||
@ -113,35 +113,35 @@ GetComponentCount(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetDumpLine(int id, int n)
|
GetDumpStringLine(int id, int n)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "GetDumpLine: Invalid instance id.\n";
|
static const char err_msg[] = "GetDumpStringLine: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return IPhreeqcPtr->GetDumpLine(n);
|
return IPhreeqcPtr->GetDumpStringLine(n);
|
||||||
}
|
}
|
||||||
return err_msg;
|
return err_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetDumpLineCount(int id)
|
GetDumpStringLineCount(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return IPhreeqcPtr->GetDumpLineCount();
|
return IPhreeqcPtr->GetDumpStringLineCount();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetDumpOn(int id)
|
GetDumpFileOn(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
if (IPhreeqcPtr->GetDumpOn())
|
if (IPhreeqcPtr->GetDumpFileOn())
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -184,35 +184,35 @@ GetDumpStringOn(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetErrorLine(int id, int n)
|
GetErrorStringLine(int id, int n)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "GetErrorLine: Invalid instance id.\n";
|
static const char err_msg[] = "GetErrorStringLine: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return IPhreeqcPtr->GetErrorLine(n);
|
return IPhreeqcPtr->GetErrorStringLine(n);
|
||||||
}
|
}
|
||||||
return err_msg;
|
return err_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetErrorLineCount(int id)
|
GetErrorStringLineCount(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return (int)IPhreeqcPtr->GetErrorLineCount();
|
return (int)IPhreeqcPtr->GetErrorStringLineCount();
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetErrorOn(int id)
|
GetErrorFileOn(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
if (IPhreeqcPtr->GetErrorOn())
|
if (IPhreeqcPtr->GetErrorFileOn())
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -237,12 +237,12 @@ GetErrorString(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetLogOn(int id)
|
GetLogFileOn(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
if (IPhreeqcPtr->GetLogOn())
|
if (IPhreeqcPtr->GetLogFileOn())
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -255,12 +255,12 @@ GetLogOn(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetOutputOn(int id)
|
GetOutputFileOn(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
if (IPhreeqcPtr->GetOutputOn())
|
if (IPhreeqcPtr->GetOutputFileOn())
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -284,12 +284,12 @@ GetSelectedOutputColumnCount(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetSelectedOutputOn(int id)
|
GetSelectedOutputFileOn(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
if (IPhreeqcPtr->GetSelectedOutputOn())
|
if (IPhreeqcPtr->GetSelectedOutputFileOn())
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -334,24 +334,24 @@ GetSelectedOutputValue(int id, int row, int col, VAR* pVAR)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetWarningLine(int id, int n)
|
GetWarningStringLine(int id, int n)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "GetWarningLine: Invalid instance id.\n";
|
static const char err_msg[] = "GetWarningStringLine: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return IPhreeqcPtr->GetWarningLine(n);
|
return IPhreeqcPtr->GetWarningStringLine(n);
|
||||||
}
|
}
|
||||||
return err_msg;
|
return err_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetWarningLineCount(int id)
|
GetWarningStringLineCount(int id)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
return (int)IPhreeqcPtr->GetWarningLineCount();
|
return (int)IPhreeqcPtr->GetWarningStringLineCount();
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
@ -391,39 +391,39 @@ LoadDatabaseString(int id, const char* input)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputError(int id)
|
OutputErrorString(int id)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "OutputError: Invalid instance id.\n";
|
static const char err_msg[] = "OutputErrorString: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->OutputError();
|
IPhreeqcPtr->OutputErrorString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout << err_msg << std::endl;
|
std::cout << err_msg << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputLines(int id)
|
OutputAccumulatedLines(int id)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "OutputLines: Invalid instance id.\n";
|
static const char err_msg[] = "OutputAccumulatedLines: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->OutputLines();
|
IPhreeqcPtr->OutputAccumulatedLines();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout << err_msg << std::endl;
|
std::cout << err_msg << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputWarning(int id)
|
OutputWarningString(int id)
|
||||||
{
|
{
|
||||||
static const char err_msg[] = "OutputWarning: Invalid instance id.\n";
|
static const char err_msg[] = "OutputWarningString: Invalid instance id.\n";
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->OutputWarning();
|
IPhreeqcPtr->OutputWarningString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::cout << err_msg << std::endl;
|
std::cout << err_msg << std::endl;
|
||||||
@ -463,12 +463,12 @@ RunString(int id, const char* input)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetDumpOn(int id, int value)
|
SetDumpFileOn(int id, int value)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->SetDumpOn(value != 0);
|
IPhreeqcPtr->SetDumpFileOn(value != 0);
|
||||||
return IPQ_OK;
|
return IPQ_OK;
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
@ -487,48 +487,48 @@ SetDumpStringOn(int id, int value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetErrorOn(int id, int value)
|
SetErrorFileOn(int id, int value)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->SetErrorOn(value != 0);
|
IPhreeqcPtr->SetErrorFileOn(value != 0);
|
||||||
return IPQ_OK;
|
return IPQ_OK;
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetLogOn(int id, int value)
|
SetLogFileOn(int id, int value)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->SetLogOn(value != 0);
|
IPhreeqcPtr->SetLogFileOn(value != 0);
|
||||||
return IPQ_OK;
|
return IPQ_OK;
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetOutputOn(int id, int value)
|
SetOutputFileOn(int id, int value)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->SetOutputOn(value != 0);
|
IPhreeqcPtr->SetOutputFileOn(value != 0);
|
||||||
return IPQ_OK;
|
return IPQ_OK;
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetSelectedOutputOn(int id, int value)
|
SetSelectedOutputFileOn(int id, int value)
|
||||||
{
|
{
|
||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
IPhreeqcPtr->SetSelectedOutputOn(value != 0);
|
IPhreeqcPtr->SetSelectedOutputFileOn(value != 0);
|
||||||
return IPQ_OK;
|
return IPQ_OK;
|
||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
|
|||||||
152
src/fwrap.cpp
152
src/fwrap.cpp
@ -85,21 +85,21 @@ GetComponentF(int *id, int *n, char* comp, unsigned int line_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetDumpLineCountF(int *id)
|
GetDumpStringLineCountF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetDumpLineCount(*id);
|
return ::GetDumpStringLineCount(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GetDumpLineF(int *id, int* n, char* line, unsigned int line_length)
|
GetDumpStringLineF(int *id, int* n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
padfstring(line, ::GetDumpLine(*id, (*n) - 1), line_length);
|
padfstring(line, ::GetDumpStringLine(*id, (*n) - 1), line_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetDumpOnF(int *id)
|
GetDumpFileOnF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetDumpOn(*id);
|
return ::GetDumpFileOn(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -109,33 +109,33 @@ GetDumpStringOnF(int *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetErrorLineCountF(int *id)
|
GetErrorStringLineCountF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetErrorLineCount(*id);
|
return ::GetErrorStringLineCount(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GetErrorLineF(int *id, int* n, char* line, unsigned int line_length)
|
GetErrorStringLineF(int *id, int* n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
padfstring(line, ::GetErrorLine(*id, (*n) - 1), line_length);
|
padfstring(line, ::GetErrorStringLine(*id, (*n) - 1), line_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetErrorOnF(int *id)
|
GetErrorFileOnF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetErrorOn(*id);
|
return ::GetErrorFileOn(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetLogOnF(int *id)
|
GetLogFileOnF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetLogOn(*id);
|
return ::GetLogFileOn(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetOutputOnF(int *id)
|
GetOutputFileOnF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetOutputOn(*id);
|
return ::GetOutputFileOn(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -145,9 +145,9 @@ GetSelectedOutputColumnCountF(int *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetSelectedOutputOnF(int *id)
|
GetSelectedOutputFileOnF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetSelectedOutputOn(*id);
|
return ::GetSelectedOutputFileOn(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -204,15 +204,15 @@ GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
GetWarningLineCountF(int *id)
|
GetWarningStringLineCountF(int *id)
|
||||||
{
|
{
|
||||||
return ::GetWarningLineCount(*id);
|
return ::GetWarningStringLineCount(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GetWarningLineF(int *id, int* n, char* line, unsigned int line_length)
|
GetWarningStringLineF(int *id, int* n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
padfstring(line, ::GetWarningLine(*id, (*n) - 1), line_length);
|
padfstring(line, ::GetWarningStringLine(*id, (*n) - 1), line_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -250,21 +250,21 @@ LoadDatabaseStringF(int *id, char* input, unsigned int input_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputErrorF(int *id)
|
OutputErrorStringF(int *id)
|
||||||
{
|
{
|
||||||
::OutputError(*id);
|
::OutputErrorString(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputLinesF(int *id)
|
OutputAccumulatedLinesF(int *id)
|
||||||
{
|
{
|
||||||
::OutputLines(*id);
|
::OutputAccumulatedLines(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputWarningF(int *id)
|
OutputWarningStringF(int *id)
|
||||||
{
|
{
|
||||||
::OutputWarning(*id);
|
::OutputWarningString(*id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -308,9 +308,9 @@ RunStringF(int *id, char* input, unsigned int input_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetDumpOnF(int *id, int* dump_on)
|
SetDumpFileOnF(int *id, int* dump_on)
|
||||||
{
|
{
|
||||||
return ::SetDumpOn(*id, *dump_on);
|
return ::SetDumpFileOn(*id, *dump_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
@ -320,27 +320,27 @@ SetDumpStringOnF(int *id, int* dump_string_on)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetErrorOnF(int *id, int* error_on)
|
SetErrorFileOnF(int *id, int* error_on)
|
||||||
{
|
{
|
||||||
return ::SetErrorOn(*id, *error_on);
|
return ::SetErrorFileOn(*id, *error_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetLogOnF(int *id, int* log_on)
|
SetLogFileOnF(int *id, int* log_on)
|
||||||
{
|
{
|
||||||
return ::SetLogOn(*id, *log_on);
|
return ::SetLogFileOn(*id, *log_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetOutputOnF(int *id, int* output_on)
|
SetOutputFileOnF(int *id, int* output_on)
|
||||||
{
|
{
|
||||||
return ::SetOutputOn(*id, *output_on);
|
return ::SetOutputFileOn(*id, *output_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetSelectedOutputOnF(int *id, int* sel_on)
|
SetSelOutFileOnF(int *id, int* sel_on)
|
||||||
{
|
{
|
||||||
return ::SetSelectedOutputOn(*id, *sel_on);
|
return ::SetSelectedOutputFileOn(*id, *sel_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -383,49 +383,49 @@ DLL_EXPORT int __stdcall GETCOMPONENTCOUNT(int *id)
|
|||||||
{
|
{
|
||||||
return GetComponentCountF(id);
|
return GetComponentCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall GETDUMPLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void __stdcall GETDUMPSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetDumpLineF(id, n, line, line_length);
|
GetDumpStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETDUMPLINECOUNT(int *id)
|
DLL_EXPORT int __stdcall GETDUMPSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpLineCountF(id);
|
return GetDumpStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETDUMPON(int *id)
|
DLL_EXPORT int __stdcall GETDUMPFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpOnF(id);
|
return GetDumpFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETDUMPSTRINGON(int *id)
|
DLL_EXPORT int __stdcall GETDUMPSTRINGON(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpStringOnF(id);
|
return GetDumpStringOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall GETERRORLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void __stdcall GETERRORSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetErrorLineF(id, n, line, line_length);
|
GetErrorStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETERRORLINECOUNT(int *id)
|
DLL_EXPORT int __stdcall GETERRORSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorLineCountF(id);
|
return GetErrorStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETERRORON(int *id)
|
DLL_EXPORT int __stdcall GETERRORFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorOnF(id);
|
return GetErrorFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETLOGON(int *id)
|
DLL_EXPORT int __stdcall GETLOGFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetLogOnF(id);
|
return GetLogFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETOUTPUTON(int *id)
|
DLL_EXPORT int __stdcall GETOUTPUTFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetOutputOnF(id);
|
return GetOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputColumnCountF(id);
|
return GetSelectedOutputColumnCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTON(int *id)
|
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputOnF(id);
|
return GetSelectedOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTROWCOUNT(int *id)
|
DLL_EXPORT int __stdcall GETSELECTEDOUTPUTROWCOUNT(int *id)
|
||||||
{
|
{
|
||||||
@ -435,13 +435,13 @@ DLL_EXPORT int __stdcall GETSELECTEDOUTPUTVALUE(int *id, int *row, int *col, in
|
|||||||
{
|
{
|
||||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall GETWARNINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void __stdcall GETWARNINGSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetWarningLineF(id, n, line, line_length);
|
GetWarningStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall GETWARNINGLINECOUNT(int *id)
|
DLL_EXPORT int __stdcall GETWARNINGSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetWarningLineCountF(id);
|
return GetWarningStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall LOADDATABASE(int *id, char *filename, unsigned int len)
|
DLL_EXPORT int __stdcall LOADDATABASE(int *id, char *filename, unsigned int len)
|
||||||
{
|
{
|
||||||
@ -451,17 +451,17 @@ DLL_EXPORT int __stdcall LOADDATABASESTRING(int *id, char *input, unsigned int
|
|||||||
{
|
{
|
||||||
return LoadDatabaseStringF(id, input, len);
|
return LoadDatabaseStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall OUTPUTERROR(int *id)
|
DLL_EXPORT void __stdcall OUTPUTERRORSTRING(int *id)
|
||||||
{
|
{
|
||||||
OutputErrorF(id);
|
OutputErrorStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall OUTPUTLINES(int *id)
|
DLL_EXPORT void __stdcall OUTPUTACCUMULATEDLINES(int *id)
|
||||||
{
|
{
|
||||||
OutputLinesF(id);
|
OutputAccumulatedLinesF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall OUTPUTWARNING(int *id)
|
DLL_EXPORT void __stdcall OUTPUTWARNINGSTRING(int *id)
|
||||||
{
|
{
|
||||||
OutputWarningF(id);
|
OutputWarningStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall RUNACCUMULATED(int *id)
|
DLL_EXPORT int __stdcall RUNACCUMULATED(int *id)
|
||||||
{
|
{
|
||||||
@ -475,29 +475,29 @@ DLL_EXPORT int __stdcall RUNSTRING(int *id, char *input, unsigned int len)
|
|||||||
{
|
{
|
||||||
return RunStringF(id, input, len);
|
return RunStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETDUMPON(int *id, int *dump_on)
|
DLL_EXPORT void __stdcall SETDUMPFILEON(int *id, int *dump_on)
|
||||||
{
|
{
|
||||||
SetDumpOnF(id, dump_on);
|
SetDumpFileOnF(id, dump_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETDUMPSTRINGON(int *id, int *dump_string_on)
|
DLL_EXPORT void __stdcall SETDUMPSTRINGON(int *id, int *dump_string_on)
|
||||||
{
|
{
|
||||||
SetDumpStringOnF(id, dump_string_on);
|
SetDumpStringOnF(id, dump_string_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETERRORON(int *id, int *error_on)
|
DLL_EXPORT void __stdcall SETERRORFILEON(int *id, int *error_on)
|
||||||
{
|
{
|
||||||
SetErrorOnF(id, error_on);
|
SetErrorFileOnF(id, error_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETLOGON(int *id, int *log_on)
|
DLL_EXPORT void __stdcall SETLOGFILEON(int *id, int *log_on)
|
||||||
{
|
{
|
||||||
SetLogOnF(id, log_on);
|
SetLogFileOnF(id, log_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETOUTPUTON(int *id, int *output_on)
|
DLL_EXPORT void __stdcall SETOUTPUTFILEON(int *id, int *output_on)
|
||||||
{
|
{
|
||||||
SetOutputOnF(id, output_on);
|
SetOutputFileOnF(id, output_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void __stdcall SETSELECTEDOUTPUTON(int *id, int *selected_on)
|
DLL_EXPORT void __stdcall SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||||
{
|
{
|
||||||
SetSelectedOutputOnF(id, selected_on);
|
SetSelOutFileOnF(id, selected_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int __stdcall UNLOADDATABASE(int *id)
|
DLL_EXPORT int __stdcall UNLOADDATABASE(int *id)
|
||||||
{
|
{
|
||||||
|
|||||||
76
src/fwrap.h
76
src/fwrap.h
@ -14,35 +14,35 @@
|
|||||||
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||||
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||||
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
||||||
#define GetDumpLineCountF FC_FUNC (getdumplinecountf, GETDUMPLINECOUNTF)
|
#define GetDumpStringLineCountF FC_FUNC (getdumpstringlinecountf, GETDUMPSTRINGLINECOUNTF)
|
||||||
#define GetDumpLineF FC_FUNC (getdumplinef, GETDUMPLINEF)
|
#define GetDumpStringLineF FC_FUNC (getdumpstringlinef, GETDUMPSTRINGLINEF)
|
||||||
#define GetDumpOnF FC_FUNC (getdumponf, GETDUMPONF)
|
#define GetDumpFileOnF FC_FUNC (getdumpfileonf, GETDUMPFILEONF)
|
||||||
#define GetDumpStringOnF FC_FUNC (getdumpstringonf, GETDUMPSTRINGONF)
|
#define GetDumpStringOnF FC_FUNC (getdumpstringonf, GETDUMPSTRINGONF)
|
||||||
#define GetErrorLineCountF FC_FUNC (geterrorlinecountf, GETERRORLINECOUNTF)
|
#define GetErrorStringLineCountF FC_FUNC (geterrorstringlinecountf, GETERRORSTRINGLINECOUNTF)
|
||||||
#define GetErrorLineF FC_FUNC (geterrorlinef, GETERRORLINEF)
|
#define GetErrorStringLineF FC_FUNC (geterrorstringlinef, GETERRORSTRINGLINEF)
|
||||||
#define GetErrorOnF FC_FUNC (geterroronf, GETERRORONF)
|
#define GetErrorFileOnF FC_FUNC (geterrorfileonf, GETERRORFILEONF)
|
||||||
#define GetLogOnF FC_FUNC (getlogonf, GETLOGONF)
|
#define GetLogFileOnF FC_FUNC (getlogfileonf, GETLOGFILEONF)
|
||||||
#define GetOutputOnF FC_FUNC (getoutputonf, GETOUTPUTONF)
|
#define GetOutputFileOnF FC_FUNC (getoutputfileonf, GETOUTPUTFILEONF)
|
||||||
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||||
#define GetSelectedOutputOnF FC_FUNC (getselectedoutputonf, GETSELECTEDOUTPUTONF)
|
#define GetSelectedOutputFileOnF FC_FUNC (getselectedoutputfileonf, GETSELECTEDOUTPUTFILEONF)
|
||||||
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||||
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||||
#define GetWarningLineCountF FC_FUNC (getwarninglinecountf, GETWARNINGLINECOUNTF)
|
#define GetWarningStringLineCountF FC_FUNC (getwarningstringlinecountf, GETWARNINGSTRINGLINECOUNTF)
|
||||||
#define GetWarningLineF FC_FUNC (getwarninglinef, GETWARNINGLINEF)
|
#define GetWarningStringLineF FC_FUNC (getwarningstringlinef, GETWARNINGSTRINGLINEF)
|
||||||
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
||||||
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||||
#define OutputErrorF FC_FUNC (outputerrorf, OUTPUTERRORF)
|
#define OutputErrorStringF FC_FUNC (outputerrorstringf, OUTPUTERRORSTRINGF)
|
||||||
#define OutputLinesF FC_FUNC (outputlinesf, OUTPUTLINESF)
|
#define OutputAccumulatedLinesF FC_FUNC (outputaccumulatedlinesf, OUTPUTACCUMULATEDLINESF)
|
||||||
#define OutputWarningF FC_FUNC (outputwarningf, OUTPUTWARNINGF)
|
#define OutputWarningStringF FC_FUNC (outputwarningstringf, OUTPUTWARNINGSTRINGF)
|
||||||
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||||
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
||||||
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
||||||
#define SetDumpOnF FC_FUNC (setdumponf, SETDUMPONF)
|
#define SetDumpFileOnF FC_FUNC (setdumpfileonf, SETDUMPFILEONF)
|
||||||
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||||
#define SetErrorOnF FC_FUNC (seterroronf, SETERRORONF)
|
#define SetErrorFileOnF FC_FUNC (seterrorfileonf, SETERRORFILEONF)
|
||||||
#define SetLogOnF FC_FUNC (setlogonf, SETLOGONF)
|
#define SetLogFileOnF FC_FUNC (setlogfileonf, SETLOGFILEONF)
|
||||||
#define SetOutputOnF FC_FUNC (setoutputonf, SETOUTPUTONF)
|
#define SetOutputFileOnF FC_FUNC (setoutputfileonf, SETOUTPUTFILEONF)
|
||||||
#define SetSelectedOutputOnF FC_FUNC (setselectedoutputonf, SETSELECTEDOUTPUTONF)
|
#define SetSelOutFileOnF FC_FUNC (setseloutfileonf, SETSELOUTFILEONF)
|
||||||
#define UnLoadDatabaseF FC_FUNC (unloaddatabasef, UNLOADDATABASEF)
|
#define UnLoadDatabaseF FC_FUNC (unloaddatabasef, UNLOADDATABASEF)
|
||||||
#endif /* FC_FUNC */
|
#endif /* FC_FUNC */
|
||||||
|
|
||||||
@ -56,35 +56,35 @@ extern "C" {
|
|||||||
int DestroyIPhreeqcF(int *id);
|
int DestroyIPhreeqcF(int *id);
|
||||||
int GetComponentCountF(int *id);
|
int GetComponentCountF(int *id);
|
||||||
void GetComponentF(int *id, int* n, char* line, unsigned int line_length);
|
void GetComponentF(int *id, int* n, char* line, unsigned int line_length);
|
||||||
int GetDumpLineCountF(int *id);
|
int GetDumpStringLineCountF(int *id);
|
||||||
void GetDumpLineF(int *id, int* n, char* line, unsigned int line_length);
|
void GetDumpStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||||
int GetDumpOnF(int *id);
|
int GetDumpFileOnF(int *id);
|
||||||
int GetDumpStringOnF(int *id);
|
int GetDumpStringOnF(int *id);
|
||||||
int GetErrorLineCountF(int *id);
|
int GetErrorStringLineCountF(int *id);
|
||||||
void GetErrorLineF(int *id, int* n, char* line, unsigned int line_length);
|
void GetErrorStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||||
int GetErrorOnF(int *id);
|
int GetErrorFileOnF(int *id);
|
||||||
int GetLogOnF(int *id);
|
int GetLogFileOnF(int *id);
|
||||||
int GetOutputOnF(int *id);
|
int GetOutputFileOnF(int *id);
|
||||||
int GetSelectedOutputColumnCountF(int *id);
|
int GetSelectedOutputColumnCountF(int *id);
|
||||||
int GetSelectedOutputOnF(int *id);
|
int GetSelectedOutputFileOnF(int *id);
|
||||||
int GetSelectedOutputRowCountF(int *id);
|
int GetSelectedOutputRowCountF(int *id);
|
||||||
IPQ_RESULT GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
|
IPQ_RESULT GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
|
||||||
int GetWarningLineCountF(int *id);
|
int GetWarningStringLineCountF(int *id);
|
||||||
void GetWarningLineF(int *id, int* n, char* line, unsigned int line_length);
|
void GetWarningStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||||
int LoadDatabaseF(int *id, char* filename, unsigned int filename_length);
|
int LoadDatabaseF(int *id, char* filename, unsigned int filename_length);
|
||||||
int LoadDatabaseStringF(int *id, char* input, unsigned int input_length);
|
int LoadDatabaseStringF(int *id, char* input, unsigned int input_length);
|
||||||
void OutputErrorF(int *id);
|
void OutputErrorStringF(int *id);
|
||||||
void OutputLinesF(int *id);
|
void OutputAccumulatedLinesF(int *id);
|
||||||
void OutputWarningF(int *id);
|
void OutputWarningStringF(int *id);
|
||||||
int RunAccumulatedF(int *id);
|
int RunAccumulatedF(int *id);
|
||||||
int RunFileF(int *id, char* filename, unsigned int filename_length);
|
int RunFileF(int *id, char* filename, unsigned int filename_length);
|
||||||
int RunStringF(int *id, char* input, unsigned int input_length);
|
int RunStringF(int *id, char* input, unsigned int input_length);
|
||||||
IPQ_RESULT SetDumpOnF(int *id, int* dump_on);
|
IPQ_RESULT SetDumpFileOnF(int *id, int* dump_on);
|
||||||
IPQ_RESULT SetDumpStringOnF(int *id, int* dump_string_on);
|
IPQ_RESULT SetDumpStringOnF(int *id, int* dump_string_on);
|
||||||
IPQ_RESULT SetErrorOnF(int *id, int* error_on);
|
IPQ_RESULT SetErrorFileOnF(int *id, int* error_on);
|
||||||
IPQ_RESULT SetLogOnF(int *id, int* log_on);
|
IPQ_RESULT SetLogFileOnF(int *id, int* log_on);
|
||||||
IPQ_RESULT SetOutputOnF(int *id, int* output_on);
|
IPQ_RESULT SetOutputFileOnF(int *id, int* output_on);
|
||||||
IPQ_RESULT SetSelectedOutputOnF(int *id, int* selected_output_on);
|
IPQ_RESULT SetSelOutFileOnF(int *id, int* selected_output_on);
|
||||||
int UnLoadDatabaseF(int *id);
|
int UnLoadDatabaseF(int *id);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
|||||||
@ -35,49 +35,49 @@ DLL_EXPORT int GETCOMPONENTCOUNT(int *id)
|
|||||||
{
|
{
|
||||||
return GetComponentCountF(id);
|
return GetComponentCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void GETDUMPLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void GETDUMPSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetDumpLineF(id, n, line, line_length);
|
GetDumpStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETDUMPLINECOUNT(int *id)
|
DLL_EXPORT int GETDUMPSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpLineCountF(id);
|
return GetDumpStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETDUMPON(int *id)
|
DLL_EXPORT int GETDUMPFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpOnF(id);
|
return GetDumpFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETDUMPSTRINGON(int *id)
|
DLL_EXPORT int GETDUMPSTRINGON(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpStringOnF(id);
|
return GetDumpStringOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void GETERRORLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void GETERRORSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetErrorLineF(id, n, line, line_length);
|
GetErrorStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETERRORLINECOUNT(int *id)
|
DLL_EXPORT int GETERRORSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorLineCountF(id);
|
return GetErrorStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETERRORON(int *id)
|
DLL_EXPORT int GETERRORFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorOnF(id);
|
return GetErrorFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETLOGON(int *id)
|
DLL_EXPORT int GETLOGFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetLogOnF(id);
|
return GetLogFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETOUTPUTON(int *id)
|
DLL_EXPORT int GETOUTPUTFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetOutputOnF(id);
|
return GetOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
DLL_EXPORT int GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputColumnCountF(id);
|
return GetSelectedOutputColumnCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETSELECTEDOUTPUTON(int *id)
|
DLL_EXPORT int GETSELECTEDOUTPUTFILEON(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputOnF(id);
|
return GetSelectedOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETSELECTEDOUTPUTROWCOUNT(int *id)
|
DLL_EXPORT int GETSELECTEDOUTPUTROWCOUNT(int *id)
|
||||||
{
|
{
|
||||||
@ -87,13 +87,13 @@ DLL_EXPORT int GETSELECTEDOUTPUTVALUE(int *id, int *row, int *col, int *vtype,
|
|||||||
{
|
{
|
||||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void GETWARNINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void GETWARNINGSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetWarningLineF(id, n, line, line_length);
|
GetWarningStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int GETWARNINGLINECOUNT(int *id)
|
DLL_EXPORT int GETWARNINGSTRINGLINECOUNT(int *id)
|
||||||
{
|
{
|
||||||
return GetWarningLineCountF(id);
|
return GetWarningStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int LOADDATABASE(int *id, char *filename, unsigned int len)
|
DLL_EXPORT int LOADDATABASE(int *id, char *filename, unsigned int len)
|
||||||
{
|
{
|
||||||
@ -103,17 +103,17 @@ DLL_EXPORT int LOADDATABASESTRING(int *id, char *input, unsigned int len)
|
|||||||
{
|
{
|
||||||
return LoadDatabaseStringF(id, input, len);
|
return LoadDatabaseStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void OUTPUTERROR(int *id)
|
DLL_EXPORT void OUTPUTERRORSTRING(int *id)
|
||||||
{
|
{
|
||||||
OutputErrorF(id);
|
OutputErrorStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void OUTPUTLINES(int *id)
|
DLL_EXPORT void OUTPUTACCUMULATEDLINES(int *id)
|
||||||
{
|
{
|
||||||
OutputLinesF(id);
|
OutputAccumulatedLinesF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void OUTPUTWARNING(int *id)
|
DLL_EXPORT void OUTPUTWARNINGSTRING(int *id)
|
||||||
{
|
{
|
||||||
OutputWarningF(id);
|
OutputWarningStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int RUNACCUMULATED(int *id)
|
DLL_EXPORT int RUNACCUMULATED(int *id)
|
||||||
{
|
{
|
||||||
@ -127,29 +127,29 @@ DLL_EXPORT int RUNSTRING(int *id, char *input, unsigned int len)
|
|||||||
{
|
{
|
||||||
return RunStringF(id, input, len);
|
return RunStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETDUMPON(int *id, int *dump_on)
|
DLL_EXPORT void SETDUMPFILEON(int *id, int *dump_on)
|
||||||
{
|
{
|
||||||
SetDumpOnF(id, dump_on);
|
SetDumpFileOnF(id, dump_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETDUMPSTRINGON(int *id, int *dump_string_on)
|
DLL_EXPORT void SETDUMPSTRINGON(int *id, int *dump_string_on)
|
||||||
{
|
{
|
||||||
SetDumpStringOnF(id, dump_string_on);
|
SetDumpStringOnF(id, dump_string_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETERRORON(int *id, int *error_on)
|
DLL_EXPORT void SETERRORFILEON(int *id, int *error_on)
|
||||||
{
|
{
|
||||||
SetErrorOnF(id, error_on);
|
SetErrorFileOnF(id, error_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETLOGON(int *id, int *log_on)
|
DLL_EXPORT void SETLOGFILEON(int *id, int *log_on)
|
||||||
{
|
{
|
||||||
SetLogOnF(id, log_on);
|
SetLogFileOnF(id, log_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETOUTPUTON(int *id, int *output_on)
|
DLL_EXPORT void SETOUTPUTFILEON(int *id, int *output_on)
|
||||||
{
|
{
|
||||||
SetOutputOnF(id, output_on);
|
SetOutputFileOnF(id, output_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void SETSELECTEDOUTPUTON(int *id, int *selected_on)
|
DLL_EXPORT void SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||||
{
|
{
|
||||||
SetSelectedOutputOnF(id, selected_on);
|
SetSelOutFileOnF(id, selected_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int UNLOADDATABASE(int *id)
|
DLL_EXPORT int UNLOADDATABASE(int *id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,49 +34,49 @@ DLL_EXPORT int getcomponentcount_(int *id)
|
|||||||
{
|
{
|
||||||
return GetComponentCountF(id);
|
return GetComponentCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void getdumpline_(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void getdumpstringline_(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetDumpLineF(id, n, line, line_length);
|
GetDumpStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getdumplinecount_(int *id)
|
DLL_EXPORT int getdumpstringlinecount_(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpLineCountF(id);
|
return GetDumpStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getdumpon_(int *id)
|
DLL_EXPORT int getdumpfileon_(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpOnF(id);
|
return GetDumpFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getdumpstringon_(int *id)
|
DLL_EXPORT int getdumpstringon_(int *id)
|
||||||
{
|
{
|
||||||
return GetDumpStringOnF(id);
|
return GetDumpStringOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void geterrorline_(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void geterrorstringline_(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetErrorLineF(id, n, line, line_length);
|
GetErrorStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int geterrorlinecount_(int *id)
|
DLL_EXPORT int geterrorstringlinecount_(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorLineCountF(id);
|
return GetErrorStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int geterroron_(int *id)
|
DLL_EXPORT int geterrorfileon_(int *id)
|
||||||
{
|
{
|
||||||
return GetErrorOnF(id);
|
return GetErrorFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getlogon_(int *id)
|
DLL_EXPORT int getlogfileon_(int *id)
|
||||||
{
|
{
|
||||||
return GetLogOnF(id);
|
return GetLogFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getoutputon_(int *id)
|
DLL_EXPORT int getoutputfileon_(int *id)
|
||||||
{
|
{
|
||||||
return GetOutputOnF(id);
|
return GetOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getselectedoutputcolumncount_(int *id)
|
DLL_EXPORT int getselectedoutputcolumncount_(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputColumnCountF(id);
|
return GetSelectedOutputColumnCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getselectedoutputon_(int *id)
|
DLL_EXPORT int getselectedoutputfileon_(int *id)
|
||||||
{
|
{
|
||||||
return GetSelectedOutputOnF(id);
|
return GetSelectedOutputFileOnF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getselectedoutputrowcount_(int *id)
|
DLL_EXPORT int getselectedoutputrowcount_(int *id)
|
||||||
{
|
{
|
||||||
@ -86,13 +86,13 @@ DLL_EXPORT int getselectedoutputvalue_(int *id, int *row, int *col, int *vtype,
|
|||||||
{
|
{
|
||||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void getwarningline_(int *id, int *n, char* line, unsigned int line_length)
|
DLL_EXPORT void getwarningstringline_(int *id, int *n, char* line, unsigned int line_length)
|
||||||
{
|
{
|
||||||
GetWarningLineF(id, n, line, line_length);
|
GetWarningStringLineF(id, n, line, line_length);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int getwarninglinecount_(int *id)
|
DLL_EXPORT int getwarningstringlinecount_(int *id)
|
||||||
{
|
{
|
||||||
return GetWarningLineCountF(id);
|
return GetWarningStringLineCountF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int loaddatabase_(int *id, char *filename, unsigned int len)
|
DLL_EXPORT int loaddatabase_(int *id, char *filename, unsigned int len)
|
||||||
{
|
{
|
||||||
@ -102,17 +102,17 @@ DLL_EXPORT int loaddatabasestring_(int *id, char *input, unsigned int len)
|
|||||||
{
|
{
|
||||||
return LoadDatabaseStringF(id, input, len);
|
return LoadDatabaseStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void outputerror_(int *id)
|
DLL_EXPORT void outputerrorstring_(int *id)
|
||||||
{
|
{
|
||||||
OutputErrorF(id);
|
OutputErrorStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void outputlines_(int *id)
|
DLL_EXPORT void outputaccumulatedlines_(int *id)
|
||||||
{
|
{
|
||||||
OutputLinesF(id);
|
OutputAccumulatedLinesF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void outputwarning_(int *id)
|
DLL_EXPORT void outputwarningstring_(int *id)
|
||||||
{
|
{
|
||||||
OutputWarningF(id);
|
OutputWarningStringF(id);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int runaccumulated_(int *id)
|
DLL_EXPORT int runaccumulated_(int *id)
|
||||||
{
|
{
|
||||||
@ -126,29 +126,29 @@ DLL_EXPORT int runstring_(int *id, char *input, unsigned int len)
|
|||||||
{
|
{
|
||||||
return RunStringF(id, input, len);
|
return RunStringF(id, input, len);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void setdumpon_(int *id, int *dump_on)
|
DLL_EXPORT void setdumpfileon_(int *id, int *dump_on)
|
||||||
{
|
{
|
||||||
SetDumpOnF(id, dump_on);
|
SetDumpFileOnF(id, dump_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void setdumpstringon_(int *id, int *dump_string_on)
|
DLL_EXPORT void setdumpstringon_(int *id, int *dump_string_on)
|
||||||
{
|
{
|
||||||
SetDumpStringOnF(id, dump_string_on);
|
SetDumpStringOnF(id, dump_string_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void seterroron_(int *id, int *error_on)
|
DLL_EXPORT void seterrorfileon_(int *id, int *error_on)
|
||||||
{
|
{
|
||||||
SetErrorOnF(id, error_on);
|
SetErrorFileOnF(id, error_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void setlogon_(int *id, int *log_on)
|
DLL_EXPORT void setlogfileon_(int *id, int *log_on)
|
||||||
{
|
{
|
||||||
SetLogOnF(id, log_on);
|
SetLogFileOnF(id, log_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void setoutputon_(int *id, int *output_on)
|
DLL_EXPORT void setoutputfileon_(int *id, int *output_on)
|
||||||
{
|
{
|
||||||
SetOutputOnF(id, output_on);
|
SetOutputFileOnF(id, output_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT void setselectedoutputon_(int *id, int *selected_on)
|
DLL_EXPORT void setselectedoutputfileon_(int *id, int *selected_on)
|
||||||
{
|
{
|
||||||
SetSelectedOutputOnF(id, selected_on);
|
SetSelOutFileOnF(id, selected_on);
|
||||||
}
|
}
|
||||||
DLL_EXPORT int unloaddatabase_(int *id)
|
DLL_EXPORT int unloaddatabase_(int *id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,7 +19,7 @@ main(int argc, const char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dump */
|
/* Dump */
|
||||||
if (TestGetSet(id, GetDumpOn, SetDumpOn))
|
if (TestGetSet(id, GetDumpFileOn, SetDumpFileOn))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
@ -31,38 +31,38 @@ main(int argc, const char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
if (TestGetSet(id, GetErrorOn, SetErrorOn))
|
if (TestGetSet(id, GetErrorFileOn, SetErrorFileOn))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Log */
|
/* Log */
|
||||||
if (TestGetSet(id, GetLogOn, SetLogOn))
|
if (TestGetSet(id, GetLogFileOn, SetLogFileOn))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
if (TestGetSet(id, GetOutputOn, SetOutputOn))
|
if (TestGetSet(id, GetOutputFileOn, SetOutputFileOn))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Selected output */
|
/* Selected output */
|
||||||
if (TestGetSet(id, GetSelectedOutputOn, SetSelectedOutputOn))
|
if (TestGetSet(id, GetSelectedOutputFileOn, SetSelectedOutputFileOn))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LoadDatabase(id, "phreeqc.dat") != 0)
|
if (LoadDatabase(id, "phreeqc.dat") != 0)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RunFile(id, "ex2") != 0)
|
if (RunFile(id, "ex2") != 0)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ main(int argc, const char* argv[])
|
|||||||
|
|
||||||
if (DestroyIPhreeqc(id) != IPQ_OK)
|
if (DestroyIPhreeqc(id) != IPQ_OK)
|
||||||
{
|
{
|
||||||
OutputError(id);
|
OutputErrorString(id);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ main(int argc, const char* argv[])
|
|||||||
IPhreeqc iphreeqc;
|
IPhreeqc iphreeqc;
|
||||||
|
|
||||||
// Dump
|
// Dump
|
||||||
TTestGetSet<IPhreeqc> testDump(&iphreeqc, &IPhreeqc::GetDumpOn, &IPhreeqc::SetDumpOn);
|
TTestGetSet<IPhreeqc> testDump(&iphreeqc, &IPhreeqc::GetDumpFileOn, &IPhreeqc::SetDumpFileOn);
|
||||||
if (testDump.Test() != EXIT_SUCCESS)
|
if (testDump.Test() != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
@ -60,28 +60,28 @@ main(int argc, const char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Error
|
// Error
|
||||||
TTestGetSet<IPhreeqc> testError(&iphreeqc, &IPhreeqc::GetErrorOn, &IPhreeqc::SetErrorOn);
|
TTestGetSet<IPhreeqc> testError(&iphreeqc, &IPhreeqc::GetErrorFileOn, &IPhreeqc::SetErrorFileOn);
|
||||||
if (testError.Test() != EXIT_SUCCESS)
|
if (testError.Test() != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
TTestGetSet<IPhreeqc> testLog(&iphreeqc, &IPhreeqc::GetLogOn, &IPhreeqc::SetLogOn);
|
TTestGetSet<IPhreeqc> testLog(&iphreeqc, &IPhreeqc::GetLogFileOn, &IPhreeqc::SetLogFileOn);
|
||||||
if (testLog.Test() != EXIT_SUCCESS)
|
if (testLog.Test() != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
TTestGetSet<IPhreeqc> testOutput(&iphreeqc, &IPhreeqc::GetOutputOn, &IPhreeqc::SetOutputOn);
|
TTestGetSet<IPhreeqc> testOutput(&iphreeqc, &IPhreeqc::GetOutputFileOn, &IPhreeqc::SetOutputFileOn);
|
||||||
if (testOutput.Test() != EXIT_SUCCESS)
|
if (testOutput.Test() != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Selected output
|
// Selected output
|
||||||
TTestGetSet<IPhreeqc> testSelectedOutput(&iphreeqc, &IPhreeqc::GetSelectedOutputOn, &IPhreeqc::SetSelectedOutputOn);
|
TTestGetSet<IPhreeqc> testSelectedOutput(&iphreeqc, &IPhreeqc::GetSelectedOutputFileOn, &IPhreeqc::SetSelectedOutputFileOn);
|
||||||
if (testSelectedOutput.Test() != EXIT_SUCCESS)
|
if (testSelectedOutput.Test() != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|||||||
@ -19,23 +19,23 @@
|
|||||||
INTEGER(KIND=4) EXIT_FAILURE
|
INTEGER(KIND=4) EXIT_FAILURE
|
||||||
PARAMETER (EXIT_FAILURE=1)
|
PARAMETER (EXIT_FAILURE=1)
|
||||||
|
|
||||||
EXTERNAL GetDumpOn
|
EXTERNAL GetDumpFileOn
|
||||||
EXTERNAL SetDumpOn
|
EXTERNAL SetDumpFileOn
|
||||||
|
|
||||||
EXTERNAL GetDumpStringOn
|
EXTERNAL GetDumpStringOn
|
||||||
EXTERNAL SetDumpStringOn
|
EXTERNAL SetDumpStringOn
|
||||||
|
|
||||||
EXTERNAL GetErrorOn
|
EXTERNAL GetErrorFileOn
|
||||||
EXTERNAL SetErrorOn
|
EXTERNAL SetErrorFileOn
|
||||||
|
|
||||||
EXTERNAL GetLogOn
|
EXTERNAL GetLogFileOn
|
||||||
EXTERNAL SetLogOn
|
EXTERNAL SetLogFileOn
|
||||||
|
|
||||||
EXTERNAL GetOutputOn
|
EXTERNAL GetOutputFileOn
|
||||||
EXTERNAL SetOutputOn
|
EXTERNAL SetOutputFileOn
|
||||||
|
|
||||||
EXTERNAL GetSelectedOutputOn
|
EXTERNAL GetSelectedOutputFileOn
|
||||||
EXTERNAL SetSelectedOutputOn
|
EXTERNAL SetSelectedOutputFileOn
|
||||||
|
|
||||||
id = CreateIPhreeqc()
|
id = CreateIPhreeqc()
|
||||||
IF (id.LT.0) THEN
|
IF (id.LT.0) THEN
|
||||||
@ -44,7 +44,7 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
C Dump
|
C Dump
|
||||||
IF (TestGetSet(id,GetDumpOn,SetDumpOn).NE.0) THEN
|
IF (TestGetSet(id,GetDumpFileOn,SetDumpFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -56,38 +56,38 @@ C Dump string
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
C Error
|
C Error
|
||||||
IF (TestGetSet(id,GetErrorOn,SetErrorOn).NE.0) THEN
|
IF (TestGetSet(id,GetErrorFileOn,SetErrorFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
C Log
|
C Log
|
||||||
IF (TestGetSet(id,GetLogOn,SetLogOn).NE.0) THEN
|
IF (TestGetSet(id,GetLogFileOn,SetLogFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
C Output
|
C Output
|
||||||
IF (TestGetSet(id,GetOutputOn,SetOutputOn).NE.0) THEN
|
IF (TestGetSet(id,GetOutputFileOn,SetOutputFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
C Selected output
|
C Selected output
|
||||||
IF (TestGetSet(id,GetSelectedOutputOn,SetSelectedOutputOn)
|
IF (TestGetSet(id,GetSelectedOutputFileOn,SetSelectedOutputFileOn)
|
||||||
& .NE.0) THEN
|
& .NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (RunFile(id, "ex2").NE.0) THEN
|
IF (RunFile(id, "ex2").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -95,7 +95,7 @@ C Selected output
|
|||||||
DO 20 r=0,GetSelectedOutputRowCount(id)
|
DO 20 r=0,GetSelectedOutputRowCount(id)
|
||||||
DO 10 c=1,GetSelectedOutputColumnCount(id)
|
DO 10 c=1,GetSelectedOutputColumnCount(id)
|
||||||
IF (GetSelectedOutputValue(id,r,c,t,d,s).NE.IPQ_OK) THEN
|
IF (GetSelectedOutputValue(id,r,c,t,d,s).NE.IPQ_OK) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -103,7 +103,7 @@ C Selected output
|
|||||||
20 CONTINUE
|
20 CONTINUE
|
||||||
|
|
||||||
IF (DestroyIPhreeqc(id).NE.0) THEN
|
IF (DestroyIPhreeqc(id).NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@ -23,7 +23,7 @@ FUNCTION F_MAIN()
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
! Dump
|
! Dump
|
||||||
IF (TestGetSet(id,GetDumpOn,SetDumpOn).NE.0) THEN
|
IF (TestGetSet(id,GetDumpFileOn,SetDumpFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -35,37 +35,37 @@ FUNCTION F_MAIN()
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
! Error
|
! Error
|
||||||
IF (TestGetSet(id,GetErrorOn,SetErrorOn).NE.0) THEN
|
IF (TestGetSet(id,GetErrorFileOn,SetErrorFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
! Log
|
! Log
|
||||||
IF (TestGetSet(id,GetLogOn,SetLogOn).NE.0) THEN
|
IF (TestGetSet(id,GetLogFileOn,SetLogFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
! Output
|
! Output
|
||||||
IF (TestGetSet(id,GetOutputOn,SetOutputOn).NE.0) THEN
|
IF (TestGetSet(id,GetOutputFileOn,SetOutputFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
! Selected output
|
! Selected output
|
||||||
IF (TestGetSet(id,GetSelectedOutputOn,SetSelectedOutputOn).NE.0) THEN
|
IF (TestGetSet(id,GetSelectedOutputFileOn,SetSelectedOutputFileOn).NE.0) THEN
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
IF (LoadDatabase(id, "phreeqc.dat").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (RunFile(id, "ex2").NE.0) THEN
|
IF (RunFile(id, "ex2").NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -73,7 +73,7 @@ FUNCTION F_MAIN()
|
|||||||
DO r=0,GetSelectedOutputRowCount(id)
|
DO r=0,GetSelectedOutputRowCount(id)
|
||||||
DO c=1,GetSelectedOutputColumnCount(id)
|
DO c=1,GetSelectedOutputColumnCount(id)
|
||||||
IF (GetSelectedOutputValue(id,r,c,t,d,s).NE.IPQ_OK) THEN
|
IF (GetSelectedOutputValue(id,r,c,t,d,s).NE.IPQ_OK) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
@ -82,7 +82,7 @@ FUNCTION F_MAIN()
|
|||||||
|
|
||||||
|
|
||||||
IF (DestroyIPhreeqc(id).NE.0) THEN
|
IF (DestroyIPhreeqc(id).NE.0) THEN
|
||||||
CALL OutputError(id)
|
CALL OutputErrorString(id)
|
||||||
F_MAIN = EXIT_FAILURE
|
F_MAIN = EXIT_FAILURE
|
||||||
RETURN
|
RETURN
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@ -190,11 +190,11 @@ void TestIPhreeqc::TestRun(void)
|
|||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine("solution 12"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine("solution 12"));
|
||||||
obj.SetOutputOn(files_on);
|
obj.SetOutputFileOn(files_on);
|
||||||
obj.SetErrorOn(files_on);
|
obj.SetErrorFileOn(files_on);
|
||||||
obj.SetLogOn(files_on);
|
obj.SetLogFileOn(files_on);
|
||||||
obj.SetSelectedOutputOn(files_on);
|
obj.SetSelectedOutputFileOn(files_on);
|
||||||
obj.SetDumpOn(files_on);
|
obj.SetDumpFileOn(files_on);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,11 +223,11 @@ void TestIPhreeqc::TestRunWithErrors(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine(" Fix_H+ -10 HCl 10"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine(" Fix_H+ -10 HCl 10"));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine("END"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, obj.AccumulateLine("END"));
|
||||||
|
|
||||||
obj.SetOutputOn(files_on);
|
obj.SetOutputFileOn(files_on);
|
||||||
obj.SetErrorOn(files_on);
|
obj.SetErrorFileOn(files_on);
|
||||||
obj.SetLogOn(files_on);
|
obj.SetLogFileOn(files_on);
|
||||||
obj.SetSelectedOutputOn(files_on);
|
obj.SetSelectedOutputFileOn(files_on);
|
||||||
obj.SetDumpOn(files_on);
|
obj.SetDumpFileOn(files_on);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, obj.RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(1, obj.RunAccumulated());
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -254,11 +254,11 @@ void TestIPhreeqc::TestRunFile(void)
|
|||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, obj.RunFile("conv_fail.in"));
|
CPPUNIT_ASSERT_EQUAL(1, obj.RunFile("conv_fail.in"));
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -354,11 +354,11 @@ void TestIPhreeqc::TestRunString(void)
|
|||||||
}
|
}
|
||||||
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
||||||
obj.SetOutputOn(1);
|
obj.SetOutputFileOn(1);
|
||||||
obj.SetErrorOn(0);
|
obj.SetErrorFileOn(0);
|
||||||
obj.SetLogOn(0);
|
obj.SetLogFileOn(0);
|
||||||
obj.SetSelectedOutputOn(0);
|
obj.SetSelectedOutputFileOn(0);
|
||||||
obj.SetDumpOn(0);
|
obj.SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.RunString(input));
|
CPPUNIT_ASSERT_EQUAL(0, obj.RunString(input));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
||||||
@ -380,11 +380,11 @@ void TestIPhreeqc::TestGetSelectedOutputRowCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES(obj, "calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES(obj, "calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH(obj, "Ca", max));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH(obj, "Ca", max));
|
||||||
|
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(3, obj.GetSelectedOutputRowCount()); // rows + header
|
CPPUNIT_ASSERT_EQUAL(3, obj.GetSelectedOutputRowCount()); // rows + header
|
||||||
@ -404,11 +404,11 @@ void TestIPhreeqc::TestGetSelectedOutputValue(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES(obj, "calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES(obj, "calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH(obj, "Ca", max));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH(obj, "Ca", max));
|
||||||
|
|
||||||
obj.SetOutputOn(0);
|
obj.SetOutputFileOn(0);
|
||||||
obj.SetErrorOn(0);
|
obj.SetErrorFileOn(0);
|
||||||
obj.SetLogOn(0);
|
obj.SetLogFileOn(0);
|
||||||
obj.SetSelectedOutputOn(0);
|
obj.SetSelectedOutputFileOn(0);
|
||||||
obj.SetDumpOn(0);
|
obj.SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, obj.RunAccumulated());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1050,7 +1050,7 @@ void TestIPhreeqc::TestAccumulateLine(void)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqc::TestOutputError(void)
|
void TestIPhreeqc::TestOutputErrorString(void)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -1065,11 +1065,11 @@ void TestIPhreeqc::TestRunNoDatabaseLoaded(void)
|
|||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
|
|
||||||
obj.UnLoadDatabase();
|
obj.UnLoadDatabase();
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 1, obj.RunAccumulated() );
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -1105,21 +1105,21 @@ void TestIPhreeqc::TestCase1(void)
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, obj.GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 62, obj.GetSelectedOutputColumnCount() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, obj.GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 62, obj.GetSelectedOutputColumnCount() );
|
||||||
@ -1156,11 +1156,11 @@ void TestIPhreeqc::TestCase2(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine("-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine("-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1182,11 +1182,11 @@ void TestIPhreeqc::TestCase2(void)
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH(obj, "Ca", 10) );
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1223,11 +1223,11 @@ void TestIPhreeqc::TestPrintSelectedOutputFalse(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine("PRINT; -selected_output false \n") );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine("PRINT; -selected_output false \n") );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.GetSelectedOutputColumnCount() );
|
||||||
@ -1244,11 +1244,11 @@ void TestIPhreeqc::TestPrintSelectedOutputFalse(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SELECTED_OUTPUT(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SELECTED_OUTPUT(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(true);
|
obj.SetSelectedOutputFileOn(true);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 11, obj.GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 11, obj.GetSelectedOutputColumnCount() );
|
||||||
@ -1339,11 +1339,11 @@ void TestOnOff(const char* FILENAME, bool output_on, bool error_on, bool log_on,
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
||||||
|
|
||||||
// run all off
|
// run all off
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
|
|
||||||
@ -1361,11 +1361,11 @@ void TestOnOff(const char* FILENAME, bool output_on, bool error_on, bool log_on,
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetDumpOn(dump_on);
|
obj.SetDumpFileOn(dump_on);
|
||||||
obj.SetErrorOn(error_on);
|
obj.SetErrorFileOn(error_on);
|
||||||
obj.SetLogOn(log_on);
|
obj.SetLogFileOn(log_on);
|
||||||
obj.SetOutputOn(output_on);
|
obj.SetOutputFileOn(output_on);
|
||||||
obj.SetSelectedOutputOn(selected_output_on);
|
obj.SetSelectedOutputFileOn(selected_output_on);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
||||||
@ -1383,11 +1383,11 @@ void TestOnOff(const char* FILENAME, bool output_on, bool error_on, bool log_on,
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
|
|
||||||
@ -1403,11 +1403,11 @@ void TestOnOff(const char* FILENAME, bool output_on, bool error_on, bool log_on,
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetDumpOn(dump_on);
|
obj.SetDumpFileOn(dump_on);
|
||||||
obj.SetErrorOn(error_on);
|
obj.SetErrorFileOn(error_on);
|
||||||
obj.SetLogOn(log_on);
|
obj.SetLogFileOn(log_on);
|
||||||
obj.SetOutputOn(output_on);
|
obj.SetOutputFileOn(output_on);
|
||||||
obj.SetSelectedOutputOn(selected_output_on);
|
obj.SetSelectedOutputFileOn(selected_output_on);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
||||||
@ -1514,11 +1514,11 @@ void TestIPhreeqc::TestLongHeadings()
|
|||||||
oss << "-end" << "\n";
|
oss << "-end" << "\n";
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine(oss.str().c_str()) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, obj.AccumulateLine(oss.str().c_str()) );
|
||||||
|
|
||||||
obj.SetOutputOn(0);
|
obj.SetOutputFileOn(0);
|
||||||
obj.SetErrorOn(0);
|
obj.SetErrorFileOn(0);
|
||||||
obj.SetLogOn(0);
|
obj.SetLogFileOn(0);
|
||||||
obj.SetSelectedOutputOn(0);
|
obj.SetSelectedOutputFileOn(0);
|
||||||
obj.SetDumpOn(0);
|
obj.SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 2, obj.GetSelectedOutputRowCount());
|
CPPUNIT_ASSERT_EQUAL( 2, obj.GetSelectedOutputRowCount());
|
||||||
@ -1543,11 +1543,11 @@ void TestIPhreeqc::TestDatabaseKeyword()
|
|||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, obj.LoadDatabase("phreeqc.dat"));
|
||||||
obj.SetOutputOn(false);
|
obj.SetOutputFileOn(false);
|
||||||
obj.SetErrorOn(false);
|
obj.SetErrorFileOn(false);
|
||||||
obj.SetLogOn(false);
|
obj.SetLogFileOn(false);
|
||||||
obj.SetSelectedOutputOn(false);
|
obj.SetSelectedOutputFileOn(false);
|
||||||
obj.SetDumpOn(false);
|
obj.SetDumpFileOn(false);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, obj.RunFile("dump"));
|
CPPUNIT_ASSERT_EQUAL(1, obj.RunFile("dump"));
|
||||||
|
|
||||||
const char *expected =
|
const char *expected =
|
||||||
@ -1571,11 +1571,11 @@ void TestIPhreeqc::TestDumpString()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
obj.SetOutputOn(0);
|
obj.SetOutputFileOn(0);
|
||||||
obj.SetErrorOn(0);
|
obj.SetErrorFileOn(0);
|
||||||
obj.SetLogOn(0);
|
obj.SetLogFileOn(0);
|
||||||
obj.SetSelectedOutputOn(0);
|
obj.SetSelectedOutputFileOn(0);
|
||||||
obj.SetDumpOn(0);
|
obj.SetDumpFileOn(0);
|
||||||
obj.SetDumpStringOn(1);
|
obj.SetDumpStringOn(1);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
|
|
||||||
@ -1641,7 +1641,7 @@ void TestIPhreeqc::TestDumpString()
|
|||||||
CPPUNIT_ASSERT_EQUAL(std::string(expected), std::string(dump_str));
|
CPPUNIT_ASSERT_EQUAL(std::string(expected), std::string(dump_str));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqc::TestGetDumpLineCount(void)
|
void TestIPhreeqc::TestGetDumpStringLineCount(void)
|
||||||
{
|
{
|
||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
|
|
||||||
@ -1654,19 +1654,19 @@ void TestIPhreeqc::TestGetDumpLineCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
||||||
obj.SetDumpStringOn(true);
|
obj.SetDumpStringOn(true);
|
||||||
CPPUNIT_ASSERT_EQUAL( true, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( true, obj.GetDumpStringOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, obj.GetDumpLineCount() );
|
CPPUNIT_ASSERT_EQUAL( 26, obj.GetDumpStringLineCount() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqc::TestGetDumpLine(void)
|
void TestIPhreeqc::TestGetDumpStringLine(void)
|
||||||
{
|
{
|
||||||
IPhreeqc obj;
|
IPhreeqc obj;
|
||||||
|
|
||||||
@ -1679,88 +1679,88 @@ void TestIPhreeqc::TestGetDumpLine(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::DUMP(obj) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::DUMP(obj) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
||||||
|
|
||||||
obj.SetDumpStringOn(true);
|
obj.SetDumpStringOn(true);
|
||||||
CPPUNIT_ASSERT_EQUAL( true, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( true, obj.GetDumpStringOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, obj.GetDumpLineCount() );
|
CPPUNIT_ASSERT_EQUAL( 26, obj.GetDumpStringLineCount() );
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// remaining lines should be empty
|
// remaining lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(line++)) );
|
||||||
|
|
||||||
// negative lines should be empty
|
// negative lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(-1)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(-1)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(-2)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(-2)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(-3)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(-3)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpLine(-4)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(obj.GetDumpStringLine(-4)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqc::TestGetComponentCount(void)
|
void TestIPhreeqc::TestGetComponentCount(void)
|
||||||
@ -1773,11 +1773,11 @@ void TestIPhreeqc::TestGetComponentCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( (size_t)3, obj.GetComponentCount() );
|
CPPUNIT_ASSERT_EQUAL( (size_t)3, obj.GetComponentCount() );
|
||||||
@ -1793,11 +1793,11 @@ void TestIPhreeqc::TestGetComponent(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( (size_t)3, obj.GetComponentCount() );
|
CPPUNIT_ASSERT_EQUAL( (size_t)3, obj.GetComponentCount() );
|
||||||
@ -1824,11 +1824,11 @@ void TestIPhreeqc::TestListComponents(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::SOLUTION(obj, 1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetErrorFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetLogFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetSelectedOutputFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpFileOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
CPPUNIT_ASSERT_EQUAL( false, obj.GetDumpStringOn() );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, obj.RunAccumulated() );
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class TestIPhreeqc : public CppUnit::TestFixture
|
|||||||
CPPUNIT_TEST( TestGetSelectedOutputColumnCount );
|
CPPUNIT_TEST( TestGetSelectedOutputColumnCount );
|
||||||
CPPUNIT_TEST( TestAddError );
|
CPPUNIT_TEST( TestAddError );
|
||||||
CPPUNIT_TEST( TestAccumulateLine );
|
CPPUNIT_TEST( TestAccumulateLine );
|
||||||
CPPUNIT_TEST( TestOutputError );
|
CPPUNIT_TEST( TestOutputErrorString );
|
||||||
CPPUNIT_TEST( TestRunWithCallback );
|
CPPUNIT_TEST( TestRunWithCallback );
|
||||||
CPPUNIT_TEST( TestRunNoDatabaseLoaded );
|
CPPUNIT_TEST( TestRunNoDatabaseLoaded );
|
||||||
CPPUNIT_TEST( TestCase1 );
|
CPPUNIT_TEST( TestCase1 );
|
||||||
@ -34,8 +34,8 @@ class TestIPhreeqc : public CppUnit::TestFixture
|
|||||||
CPPUNIT_TEST( TestLongHeadings );
|
CPPUNIT_TEST( TestLongHeadings );
|
||||||
CPPUNIT_TEST( TestDatabaseKeyword );
|
CPPUNIT_TEST( TestDatabaseKeyword );
|
||||||
CPPUNIT_TEST( TestDumpString );
|
CPPUNIT_TEST( TestDumpString );
|
||||||
CPPUNIT_TEST( TestGetDumpLineCount );
|
CPPUNIT_TEST( TestGetDumpStringLineCount );
|
||||||
CPPUNIT_TEST( TestGetDumpLine );
|
CPPUNIT_TEST( TestGetDumpStringLine );
|
||||||
CPPUNIT_TEST( TestGetComponentCount );
|
CPPUNIT_TEST( TestGetComponentCount );
|
||||||
CPPUNIT_TEST( TestGetComponent );
|
CPPUNIT_TEST( TestGetComponent );
|
||||||
CPPUNIT_TEST( TestListComponents );
|
CPPUNIT_TEST( TestListComponents );
|
||||||
@ -61,7 +61,7 @@ public:
|
|||||||
void TestGetSelectedOutputColumnCount(void);
|
void TestGetSelectedOutputColumnCount(void);
|
||||||
void TestAddError(void);
|
void TestAddError(void);
|
||||||
void TestAccumulateLine(void);
|
void TestAccumulateLine(void);
|
||||||
void TestOutputError(void);
|
void TestOutputErrorString(void);
|
||||||
void TestRunWithCallback(void);
|
void TestRunWithCallback(void);
|
||||||
void TestRunNoDatabaseLoaded(void);
|
void TestRunNoDatabaseLoaded(void);
|
||||||
void TestCase1(void);
|
void TestCase1(void);
|
||||||
@ -75,8 +75,8 @@ public:
|
|||||||
void TestLongHeadings(void);
|
void TestLongHeadings(void);
|
||||||
void TestDatabaseKeyword(void);
|
void TestDatabaseKeyword(void);
|
||||||
void TestDumpString(void);
|
void TestDumpString(void);
|
||||||
void TestGetDumpLineCount(void);
|
void TestGetDumpStringLineCount(void);
|
||||||
void TestGetDumpLine(void);
|
void TestGetDumpStringLine(void);
|
||||||
void TestGetComponentCount(void);
|
void TestGetComponentCount(void);
|
||||||
void TestGetComponent(void);
|
void TestGetComponent(void);
|
||||||
void TestListComponents(void);
|
void TestListComponents(void);
|
||||||
|
|||||||
@ -237,11 +237,11 @@ void TestIPhreeqcLib::TestRunAccumulated(void)
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "solution 12"));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "solution 12"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetLogOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetLogFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
||||||
|
|
||||||
@ -276,11 +276,11 @@ void TestIPhreeqcLib::TestRunWithErrors()
|
|||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "EQUILIBRIUM_PHASES"));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "EQUILIBRIUM_PHASES"));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, " Fix_H+ -10 HCl 10"));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, " Fix_H+ -10 HCl 10"));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "END"));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::AccumulateLine(n, "END"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetLogOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetLogFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(1, ::RunAccumulated(n));
|
CPPUNIT_ASSERT_EQUAL(1, ::RunAccumulated(n));
|
||||||
|
|
||||||
@ -315,11 +315,11 @@ void TestIPhreeqcLib::TestRunFile(void)
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetLogOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetLogFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("conv_fail.in"));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("conv_fail.in"));
|
||||||
CPPUNIT_ASSERT_EQUAL(1, ::RunFile(n, "conv_fail.in"));
|
CPPUNIT_ASSERT_EQUAL(1, ::RunFile(n, "conv_fail.in"));
|
||||||
@ -335,7 +335,7 @@ void TestIPhreeqcLib::TestRunFile(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::DestroyIPhreeqc(n));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::DestroyIPhreeqc(n));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: should this file exist since GetDumpOn is false?
|
// Note: should this file exist since GetDumpFileOn is false?
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists(dump_file));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists(dump_file));
|
||||||
CPPUNIT_ASSERT(::DeleteFile(dump_file));
|
CPPUNIT_ASSERT(::DeleteFile(dump_file));
|
||||||
}
|
}
|
||||||
@ -423,11 +423,11 @@ void TestIPhreeqcLib::TestRunString(void)
|
|||||||
int n = ::CreateIPhreeqc();
|
int n = ::CreateIPhreeqc();
|
||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase(n, "phreeqc.dat"));
|
||||||
::SetOutputOn(n, 1);
|
::SetOutputFileOn(n, 1);
|
||||||
::SetErrorOn(n, 0);
|
::SetErrorFileOn(n, 0);
|
||||||
::SetLogOn(n, 0);
|
::SetLogFileOn(n, 0);
|
||||||
::SetSelectedOutputOn(n, 0);
|
::SetSelectedOutputFileOn(n, 0);
|
||||||
::SetDumpOn(n, 0);
|
::SetDumpFileOn(n, 0);
|
||||||
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunString(n, input));
|
CPPUNIT_ASSERT_EQUAL(0, ::RunString(n, input));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
||||||
@ -454,11 +454,11 @@ void TestIPhreeqcLib::TestGetSelectedOutputRowCount()
|
|||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::EQUILIBRIUM_PHASES(n, "calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::EQUILIBRIUM_PHASES(n, "calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::USER_PUNCH(n, "Ca", max));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::USER_PUNCH(n, "Ca", max));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetLogOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetLogFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(3, ::GetSelectedOutputRowCount(n)); // rows + header
|
CPPUNIT_ASSERT_EQUAL(3, ::GetSelectedOutputRowCount(n)); // rows + header
|
||||||
@ -481,11 +481,11 @@ void TestIPhreeqcLib::TestGetSelectedOutputValue(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::EQUILIBRIUM_PHASES(n, "calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::EQUILIBRIUM_PHASES(n, "calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::USER_PUNCH(n, "Ca", max));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::USER_PUNCH(n, "Ca", max));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetErrorFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetLogOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetLogFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetSelectedOutputFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpFileOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::GetDumpStringOn(n));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated(n));
|
||||||
|
|
||||||
@ -1233,7 +1233,7 @@ void TestIPhreeqcLib::TestAccumulateLine(void)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqcLib::TestOutputError(void)
|
void TestIPhreeqcLib::TestOutputErrorString(void)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -1284,12 +1284,12 @@ void TestIPhreeqcLib::TestCase1(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount(n) );
|
||||||
@ -1327,7 +1327,7 @@ void TestIPhreeqcLib::TestCase2(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, "-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, "-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1348,7 +1348,7 @@ void TestIPhreeqcLib::TestCase2(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("case2.punch") );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::USER_PUNCH(n, "Ca", 10) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1391,7 +1391,7 @@ void TestIPhreeqcLib::TestPrintSelectedOutputFalse(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, "PRINT; -selected_output false \n") );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, "PRINT; -selected_output false \n") );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::GetSelectedOutputColumnCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::GetSelectedOutputColumnCount(n) );
|
||||||
@ -1408,7 +1408,7 @@ void TestIPhreeqcLib::TestPrintSelectedOutputFalse(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SELECTED_OUTPUT(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SELECTED_OUTPUT(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 11, ::GetSelectedOutputColumnCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 11, ::GetSelectedOutputColumnCount(n) );
|
||||||
@ -1502,11 +1502,11 @@ void TestIPhreeqcLib::TestOnOff(const char* FILENAME, int output_on, int error_o
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run all off
|
// run all off
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
@ -1522,11 +1522,11 @@ void TestIPhreeqcLib::TestOnOff(const char* FILENAME, int output_on, int error_o
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, dump_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, dump_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, error_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, error_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, log_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, log_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, output_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, output_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, selected_output_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, selected_output_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, dump_string_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, dump_string_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
@ -1543,11 +1543,11 @@ void TestIPhreeqcLib::TestOnOff(const char* FILENAME, int output_on, int error_o
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
@ -1563,11 +1563,11 @@ void TestIPhreeqcLib::TestOnOff(const char* FILENAME, int output_on, int error_o
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, dump_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, dump_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, error_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, error_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, log_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, log_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, output_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, output_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, selected_output_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, selected_output_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, dump_string_on) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, dump_string_on) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
@ -1603,11 +1603,11 @@ void TestIPhreeqcLib::TestLongHeadings(void)
|
|||||||
oss << "-end" << "\n";
|
oss << "-end" << "\n";
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, oss.str().c_str()) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::AccumulateLine(n, oss.str().c_str()) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 2, ::GetSelectedOutputRowCount(n));
|
CPPUNIT_ASSERT_EQUAL( 2, ::GetSelectedOutputRowCount(n));
|
||||||
@ -1638,11 +1638,11 @@ void TestIPhreeqcLib::TestDatabaseKeyword()
|
|||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump"));
|
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump"));
|
||||||
|
|
||||||
const char *exp_errs =
|
const char *exp_errs =
|
||||||
@ -1682,11 +1682,11 @@ void TestIPhreeqcLib::TestDumpString()
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
|
|
||||||
@ -1757,7 +1757,7 @@ void TestIPhreeqcLib::TestDumpString()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqcLib::TestGetDumpLineCount(void)
|
void TestIPhreeqcLib::TestGetDumpStringLineCount(void)
|
||||||
{
|
{
|
||||||
int n = ::CreateIPhreeqc();
|
int n = ::CreateIPhreeqc();
|
||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
@ -1771,14 +1771,14 @@ void TestIPhreeqcLib::TestGetDumpLineCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpLineCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpStringLineCount(n) );
|
||||||
|
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
{
|
{
|
||||||
@ -1786,7 +1786,7 @@ void TestIPhreeqcLib::TestGetDumpLineCount(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqcLib::TestGetDumpLine(void)
|
void TestIPhreeqcLib::TestGetDumpStringLine(void)
|
||||||
{
|
{
|
||||||
int n = ::CreateIPhreeqc();
|
int n = ::CreateIPhreeqc();
|
||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
@ -1800,85 +1800,85 @@ void TestIPhreeqcLib::TestGetDumpLine(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::DUMP(n) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 1) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpLineCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpStringLineCount(n) );
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// remaining lines should be empty
|
// remaining lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, line++)) );
|
||||||
|
|
||||||
// negative lines should be empty
|
// negative lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, -1)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, -1)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, -2)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, -2)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, -3)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, -3)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(n, -4)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(n, -4)) );
|
||||||
|
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
{
|
{
|
||||||
@ -1897,11 +1897,11 @@ void TestIPhreeqcLib::TestGetComponentCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 3, ::GetComponentCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 3, ::GetComponentCount(n) );
|
||||||
@ -1923,11 +1923,11 @@ void TestIPhreeqcLib::TestGetComponent(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SOLUTION(n, 1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpStringOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 3, ::GetComponentCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 3, ::GetComponentCount(n) );
|
||||||
@ -1948,22 +1948,22 @@ void TestIPhreeqcLib::TestGetComponent(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::DestroyIPhreeqc(n));
|
CPPUNIT_ASSERT_EQUAL(IPQ_OK, ::DestroyIPhreeqc(n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void TestIPhreeqcLib::TestGetErrorLine(void)
|
void TestIPhreeqcLib::TestGetErrorStringLine(void)
|
||||||
{
|
{
|
||||||
int n = ::CreateIPhreeqc();
|
int n = ::CreateIPhreeqc();
|
||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump") );
|
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump") );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 2, ::GetErrorLineCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 2, ::GetErrorStringLineCount(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Gas not found in PHASES data base, Amm(g)."), std::string(::GetErrorLine(n, 0)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Gas not found in PHASES data base, Amm(g)."), std::string(::GetErrorStringLine(n, 0)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Calculations terminating due to input errors."), std::string(::GetErrorLine(n, 1)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Calculations terminating due to input errors."), std::string(::GetErrorStringLine(n, 1)) );
|
||||||
|
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
{
|
{
|
||||||
@ -1971,25 +1971,25 @@ void TestIPhreeqcLib::TestGetErrorLine(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestIPhreeqcLib::TestGetWarningLine(void)
|
void TestIPhreeqcLib::TestGetWarningStringLine(void)
|
||||||
{
|
{
|
||||||
int n = ::CreateIPhreeqc();
|
int n = ::CreateIPhreeqc();
|
||||||
CPPUNIT_ASSERT(n >= 0);
|
CPPUNIT_ASSERT(n >= 0);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
CPPUNIT_ASSERT_EQUAL( 0, ::LoadDatabase(n, "phreeqc.dat") );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetErrorFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetLogFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetSelectedOutputFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpOn(n, 0) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::SetDumpFileOn(n, 0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump") );
|
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile(n, "dump") );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 5, ::GetWarningLineCount(n) );
|
CPPUNIT_ASSERT_EQUAL( 5, ::GetWarningStringLineCount(n) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: DATABASE keyword is ignored by IPhreeqc."), std::string(::GetWarningLine(n, 0)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: DATABASE keyword is ignored by IPhreeqc."), std::string(::GetWarningStringLine(n, 0)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 100."), std::string(::GetWarningLine(n, 1)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: Cell-lengths were read for 1 cells. Last value is used till cell 100."), std::string(::GetWarningStringLine(n, 1)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: No dispersivities were read; disp = 0 assumed."), std::string(::GetWarningLine(n, 2)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: No dispersivities were read; disp = 0 assumed."), std::string(::GetWarningStringLine(n, 2)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: Could not find element in database, Amm."), std::string(::GetWarningLine(n, 3)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("WARNING: Could not find element in database, Amm."), std::string(::GetWarningStringLine(n, 3)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Concentration is set to zero."), std::string(::GetWarningLine(n, 4)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Concentration is set to zero."), std::string(::GetWarningStringLine(n, 4)) );
|
||||||
|
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
{
|
{
|
||||||
@ -2047,24 +2047,28 @@ void TestIPhreeqcLib::TestClearAccumulatedLines(void)
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(::RunAccumulated(id), 1);
|
CPPUNIT_ASSERT_EQUAL(::RunAccumulated(id), 1);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 3, ::GetErrorLineCount(id) );
|
CPPUNIT_ASSERT_EQUAL( 3, ::GetErrorStringLineCount(id) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: A(H2O) Activity of water has not converged. Residual: 1.590343e+000"), std::string(::GetErrorLine(id, 0)) );
|
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetErrorLine(id, 1)) );
|
#if defined(_MSC_VER)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Model failed to converge for initial solution."), std::string(::GetErrorLine(id, 2)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: A(H2O) Activity of water has not converged. Residual: 1.590343e+000"), std::string(::GetErrorStringLine(id, 0)) );
|
||||||
|
#endif
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: A(H2O) Activity of water has not converged. Residual: 1.590343e+00"), std::string(::GetErrorStringLine(id, 0)) );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetErrorStringLine(id, 1)) );
|
||||||
|
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Model failed to converge for initial solution."), std::string(::GetErrorStringLine(id, 2)) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "SOLUTION 1"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "SOLUTION 1"), IPQ_OK);
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "pH 2"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "pH 2"), IPQ_OK);
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "END"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "END"), IPQ_OK);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(::RunAccumulated(id), 1);
|
// RunAccumulated clears accumulated lines on next call to AccumulateLine
|
||||||
|
//
|
||||||
CPPUNIT_ASSERT_EQUAL( 3, ::GetErrorLineCount(id) );
|
CPPUNIT_ASSERT_EQUAL(::RunAccumulated(id), 0);
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: A(H2O) Activity of water has not converged. Residual: 1.590343e+000"), std::string(::GetErrorLine(id, 0)) );
|
CPPUNIT_ASSERT_EQUAL( 0, ::GetErrorStringLineCount(id) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetErrorLine(id, 1)) );
|
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("ERROR: Model failed to converge for initial solution."), std::string(::GetErrorLine(id, 2)) );
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::ClearAccumulatedLines(id) );
|
CPPUNIT_ASSERT_EQUAL( IPQ_OK, ::ClearAccumulatedLines(id) );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "SOLUTION 1"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "SOLUTION 1"), IPQ_OK);
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "pH 2"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "pH 2"), IPQ_OK);
|
||||||
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "END"), IPQ_OK);
|
CPPUNIT_ASSERT_EQUAL(::AccumulateLine(id, "END"), IPQ_OK);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class TestIPhreeqcLib : public CppUnit::TestFixture
|
|||||||
CPPUNIT_TEST( TestAddError );
|
CPPUNIT_TEST( TestAddError );
|
||||||
CPPUNIT_TEST( TestAccumulateLine );
|
CPPUNIT_TEST( TestAccumulateLine );
|
||||||
CPPUNIT_TEST( TestAddError );
|
CPPUNIT_TEST( TestAddError );
|
||||||
CPPUNIT_TEST( TestOutputError );
|
CPPUNIT_TEST( TestOutputErrorString );
|
||||||
CPPUNIT_TEST( TestRunWithCallback );
|
CPPUNIT_TEST( TestRunWithCallback );
|
||||||
CPPUNIT_TEST( TestRunNoDatabaseLoaded );
|
CPPUNIT_TEST( TestRunNoDatabaseLoaded );
|
||||||
CPPUNIT_TEST( TestCase1 );
|
CPPUNIT_TEST( TestCase1 );
|
||||||
@ -37,12 +37,12 @@ class TestIPhreeqcLib : public CppUnit::TestFixture
|
|||||||
CPPUNIT_TEST( TestLongHeadings );
|
CPPUNIT_TEST( TestLongHeadings );
|
||||||
CPPUNIT_TEST( TestDatabaseKeyword );
|
CPPUNIT_TEST( TestDatabaseKeyword );
|
||||||
CPPUNIT_TEST( TestDumpString );
|
CPPUNIT_TEST( TestDumpString );
|
||||||
CPPUNIT_TEST( TestGetDumpLineCount );
|
CPPUNIT_TEST( TestGetDumpStringLineCount );
|
||||||
CPPUNIT_TEST( TestGetDumpLine );
|
CPPUNIT_TEST( TestGetDumpStringLine );
|
||||||
CPPUNIT_TEST( TestGetComponentCount );
|
CPPUNIT_TEST( TestGetComponentCount );
|
||||||
CPPUNIT_TEST( TestGetComponent );
|
CPPUNIT_TEST( TestGetComponent );
|
||||||
CPPUNIT_TEST( TestGetErrorLine );
|
CPPUNIT_TEST( TestGetErrorStringLine );
|
||||||
CPPUNIT_TEST( TestGetWarningLine );
|
CPPUNIT_TEST( TestGetWarningStringLine );
|
||||||
CPPUNIT_TEST( TestPitzer );
|
CPPUNIT_TEST( TestPitzer );
|
||||||
CPPUNIT_TEST( TestClearAccumulatedLines );
|
CPPUNIT_TEST( TestClearAccumulatedLines );
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
@ -67,7 +67,7 @@ public:
|
|||||||
void TestGetSelectedOutputColumnCount(void);
|
void TestGetSelectedOutputColumnCount(void);
|
||||||
void TestAddError(void);
|
void TestAddError(void);
|
||||||
void TestAccumulateLine(void);
|
void TestAccumulateLine(void);
|
||||||
void TestOutputError(void);
|
void TestOutputErrorString(void);
|
||||||
void TestRunWithCallback(void);
|
void TestRunWithCallback(void);
|
||||||
void TestRunNoDatabaseLoaded(void);
|
void TestRunNoDatabaseLoaded(void);
|
||||||
void TestCase1(void);
|
void TestCase1(void);
|
||||||
@ -81,12 +81,12 @@ public:
|
|||||||
void TestLongHeadings(void);
|
void TestLongHeadings(void);
|
||||||
void TestDatabaseKeyword();
|
void TestDatabaseKeyword();
|
||||||
void TestDumpString();
|
void TestDumpString();
|
||||||
void TestGetDumpLineCount(void);
|
void TestGetDumpStringLineCount(void);
|
||||||
void TestGetDumpLine(void);
|
void TestGetDumpStringLine(void);
|
||||||
void TestGetComponentCount(void);
|
void TestGetComponentCount(void);
|
||||||
void TestGetComponent(void);
|
void TestGetComponent(void);
|
||||||
void TestGetErrorLine(void);
|
void TestGetErrorStringLine(void);
|
||||||
void TestGetWarningLine(void);
|
void TestGetWarningStringLine(void);
|
||||||
void TestPitzer(void);
|
void TestPitzer(void);
|
||||||
void TestClearAccumulatedLines(void);
|
void TestClearAccumulatedLines(void);
|
||||||
|
|
||||||
|
|||||||
@ -174,11 +174,11 @@ void TestInterface::TestRun()
|
|||||||
int files_on = 0;
|
int files_on = 0;
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine("solution 12"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine("solution 12"));
|
||||||
::SetOutputOn(files_on);
|
::SetOutputFileOn(files_on);
|
||||||
::SetErrorOn(files_on);
|
::SetErrorFileOn(files_on);
|
||||||
::SetLogOn(files_on);
|
::SetLogFileOn(files_on);
|
||||||
::SetSelectedOutputOn(files_on);
|
::SetSelectedOutputFileOn(files_on);
|
||||||
::SetDumpOn(files_on);
|
::SetDumpFileOn(files_on);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,11 +206,11 @@ void TestInterface::TestRunWithErrors()
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine(" Fix_H+ -10 HCl 10"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine(" Fix_H+ -10 HCl 10"));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine("END"));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, ::AccumulateLine("END"));
|
||||||
|
|
||||||
::SetOutputOn(files_on);
|
::SetOutputFileOn(files_on);
|
||||||
::SetErrorOn(files_on);
|
::SetErrorFileOn(files_on);
|
||||||
::SetLogOn(files_on);
|
::SetLogFileOn(files_on);
|
||||||
::SetSelectedOutputOn(files_on);
|
::SetSelectedOutputFileOn(files_on);
|
||||||
::SetDumpOn(files_on);
|
::SetDumpFileOn(files_on);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, ::RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(1, ::RunAccumulated());
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -239,11 +239,11 @@ void TestInterface::TestRunFile()
|
|||||||
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, ::RunFile("conv_fail.in"));
|
CPPUNIT_ASSERT_EQUAL(1, ::RunFile("conv_fail.in"));
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -338,11 +338,11 @@ void TestInterface::TestRunString(void)
|
|||||||
}
|
}
|
||||||
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
::SetOutputOn(1);
|
::SetOutputFileOn(1);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(false, ::FileExists("phreeqc.out"));
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunString(input));
|
CPPUNIT_ASSERT_EQUAL(0, ::RunString(input));
|
||||||
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
CPPUNIT_ASSERT_EQUAL(true, ::FileExists("phreeqc.out"));
|
||||||
@ -362,11 +362,11 @@ void TestInterface::TestGetSelectedOutputRowCount()
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES("calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES("calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH("Ca", max));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH("Ca", max));
|
||||||
|
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(3, ::GetSelectedOutputRowCount()); // rows + header
|
CPPUNIT_ASSERT_EQUAL(3, ::GetSelectedOutputRowCount()); // rows + header
|
||||||
@ -384,11 +384,11 @@ void TestInterface::TestGetSelectedOutputValue()
|
|||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES("calcite", 0.0, 0.010));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, EQUILIBRIUM_PHASES("calcite", 0.0, 0.010));
|
||||||
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH("Ca", max));
|
CPPUNIT_ASSERT_EQUAL(VR_OK, USER_PUNCH("Ca", max));
|
||||||
|
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
CPPUNIT_ASSERT_EQUAL(0, ::RunAccumulated());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1043,11 +1043,11 @@ void TestInterface::TestRunWithCallback()
|
|||||||
void TestInterface::TestRunNoDatabaseLoaded()
|
void TestInterface::TestRunNoDatabaseLoaded()
|
||||||
{
|
{
|
||||||
UnLoadDatabase();
|
UnLoadDatabase();
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 1, ::RunAccumulated() );
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -1061,11 +1061,11 @@ void TestInterface::TestRunNoDatabaseLoaded()
|
|||||||
void TestInterface::TestRunFileNoDatabaseLoaded()
|
void TestInterface::TestRunFileNoDatabaseLoaded()
|
||||||
{
|
{
|
||||||
UnLoadDatabase();
|
UnLoadDatabase();
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile("dummy") );
|
CPPUNIT_ASSERT_EQUAL( 1, ::RunFile("dummy") );
|
||||||
|
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
@ -1102,21 +1102,21 @@ void TestInterface::TestCase1()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 62, ::GetSelectedOutputColumnCount() );
|
||||||
@ -1153,11 +1153,11 @@ void TestInterface::TestCase2()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine("-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine("-file case2.punch") ); // force have_punch_name to TRUE (see read_selected_ouput)
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1179,11 +1179,11 @@ void TestInterface::TestCase2()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, USER_PUNCH("Ca", 10) );
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists("selected.out") );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists("case2.punch") );
|
||||||
@ -1218,11 +1218,11 @@ void TestInterface::TestPrintSelectedOutputFalse()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine("PRINT; -selected_output false \n") );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine("PRINT; -selected_output false \n") );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::GetSelectedOutputColumnCount() );
|
||||||
@ -1239,11 +1239,11 @@ void TestInterface::TestPrintSelectedOutputFalse()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SELECTED_OUTPUT() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SELECTED_OUTPUT() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(1);
|
::SetSelectedOutputFileOn(1);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 11, ::GetSelectedOutputColumnCount() );
|
CPPUNIT_ASSERT_EQUAL( 11, ::GetSelectedOutputColumnCount() );
|
||||||
@ -1409,11 +1409,11 @@ void TestOnOff(const char* FILENAME, int output_on, int error_on, int log_on, in
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run all off
|
// run all off
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
|
|
||||||
@ -1431,11 +1431,11 @@ void TestOnOff(const char* FILENAME, int output_on, int error_on, int log_on, in
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(output_on);
|
::SetOutputFileOn(output_on);
|
||||||
::SetErrorOn(error_on);
|
::SetErrorFileOn(error_on);
|
||||||
::SetLogOn(log_on);
|
::SetLogFileOn(log_on);
|
||||||
::SetSelectedOutputOn(selected_output_on);
|
::SetSelectedOutputFileOn(selected_output_on);
|
||||||
::SetDumpOn(dump_on);
|
::SetDumpFileOn(dump_on);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
||||||
@ -1454,11 +1454,11 @@ void TestOnOff(const char* FILENAME, int output_on, int error_on, int log_on, in
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( false, ::FileExists(FILENAME) );
|
||||||
|
|
||||||
@ -1474,11 +1474,11 @@ void TestOnOff(const char* FILENAME, int output_on, int error_on, int log_on, in
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(output_on);
|
::SetOutputFileOn(output_on);
|
||||||
::SetErrorOn(error_on);
|
::SetErrorFileOn(error_on);
|
||||||
::SetLogOn(log_on);
|
::SetLogFileOn(log_on);
|
||||||
::SetSelectedOutputOn(selected_output_on);
|
::SetSelectedOutputFileOn(selected_output_on);
|
||||||
::SetDumpOn(dump_on);
|
::SetDumpFileOn(dump_on);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
CPPUNIT_ASSERT_EQUAL( true, ::FileExists(FILENAME) );
|
||||||
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
CPPUNIT_ASSERT( ::DeleteFile(FILENAME) );
|
||||||
@ -1505,11 +1505,11 @@ TestInterface::TestLongHeadings()
|
|||||||
oss << "-end" << "\n";
|
oss << "-end" << "\n";
|
||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine(oss.str().c_str()) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, ::AccumulateLine(oss.str().c_str()) );
|
||||||
|
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(2, ::GetSelectedOutputRowCount());
|
CPPUNIT_ASSERT_EQUAL(2, ::GetSelectedOutputRowCount());
|
||||||
@ -1533,11 +1533,11 @@ void
|
|||||||
TestInterface::TestDatabaseKeyword()
|
TestInterface::TestDatabaseKeyword()
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL(1, ::RunFile("dump"));
|
CPPUNIT_ASSERT_EQUAL(1, ::RunFile("dump"));
|
||||||
|
|
||||||
const char *expected =
|
const char *expected =
|
||||||
@ -1561,11 +1561,11 @@ TestInterface::TestDumpString()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
::SetDumpStringOn(1);
|
::SetDumpStringOn(1);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
@ -1632,7 +1632,7 @@ TestInterface::TestDumpString()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TestInterface::TestGetDumpLineCount()
|
TestInterface::TestGetDumpStringLineCount()
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
|
|
||||||
@ -1643,19 +1643,19 @@ TestInterface::TestGetDumpLineCount()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
::SetDumpStringOn(1);
|
::SetDumpStringOn(1);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpLineCount() );
|
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpStringLineCount() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TestInterface::TestGetDumpLine()
|
TestInterface::TestGetDumpStringLine()
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
CPPUNIT_ASSERT_EQUAL(0, ::LoadDatabase("phreeqc.dat"));
|
||||||
|
|
||||||
@ -1666,86 +1666,86 @@ TestInterface::TestGetDumpLine()
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, DUMP() );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
::SetDumpStringOn(1);
|
::SetDumpStringOn(1);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpLineCount() );
|
CPPUNIT_ASSERT_EQUAL( 26, ::GetDumpStringLineCount() );
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003929"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-025"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826911"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpStringLine(line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string("SOLUTION_RAW 1 "), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -temp 25"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_h 111.0132593403"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_o 55.509043478605"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -cb 0.0021723831003928"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -totals"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) 0.0010000000000376"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca 0.001000000004331"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) 1.4149476909313e-25"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na 0.001"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -Isotopes"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pH 7"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -pe 4"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mu 0.0028961089894362"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -ah2o 0.99994915105857"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -mass_water 1"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -total_alkalinity 0.00082761690826912"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -activities"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(-4) -67.370522674574"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" C(4) -6.4415889265024"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Ca -3.1040445240857"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" E -4"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" H(0) -25.15"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" Na -3.0255625287599"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" O(0) -42.080044167952"), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(" -gammas"), std::string(::GetDumpStringLine(line++)) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// remaining lines should be empty
|
// remaining lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(line++)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(line++)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(line++)) );
|
||||||
|
|
||||||
// negative lines should be empty
|
// negative lines should be empty
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(-1)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(-1)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(-2)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(-2)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(-3)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(-3)) );
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpLine(-4)) );
|
CPPUNIT_ASSERT_EQUAL( std::string(""), std::string(::GetDumpStringLine(-4)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1757,11 +1757,11 @@ TestInterface::TestGetComponentCount(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
::SetDumpStringOn(0);
|
::SetDumpStringOn(0);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|
||||||
@ -1778,11 +1778,11 @@ TestInterface::TestGetComponent(void)
|
|||||||
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
CPPUNIT_ASSERT_EQUAL( VR_OK, SOLUTION(1.0, 1.0, 1.0) );
|
||||||
|
|
||||||
// run
|
// run
|
||||||
::SetOutputOn(0);
|
::SetOutputFileOn(0);
|
||||||
::SetErrorOn(0);
|
::SetErrorFileOn(0);
|
||||||
::SetLogOn(0);
|
::SetLogFileOn(0);
|
||||||
::SetSelectedOutputOn(0);
|
::SetSelectedOutputFileOn(0);
|
||||||
::SetDumpOn(0);
|
::SetDumpFileOn(0);
|
||||||
::SetDumpStringOn(0);
|
::SetDumpStringOn(0);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
CPPUNIT_ASSERT_EQUAL( 0, ::RunAccumulated() );
|
||||||
|
|||||||
@ -37,8 +37,8 @@ class TestInterface :
|
|||||||
CPPUNIT_TEST( TestDatabaseKeyword );
|
CPPUNIT_TEST( TestDatabaseKeyword );
|
||||||
CPPUNIT_TEST( TestDumpOn );
|
CPPUNIT_TEST( TestDumpOn );
|
||||||
CPPUNIT_TEST( TestDumpString );
|
CPPUNIT_TEST( TestDumpString );
|
||||||
CPPUNIT_TEST( TestGetDumpLineCount );
|
CPPUNIT_TEST( TestGetDumpStringLineCount );
|
||||||
CPPUNIT_TEST( TestGetDumpLine );
|
CPPUNIT_TEST( TestGetDumpStringLine );
|
||||||
CPPUNIT_TEST( TestGetComponentCount );
|
CPPUNIT_TEST( TestGetComponentCount );
|
||||||
CPPUNIT_TEST( TestGetComponent );
|
CPPUNIT_TEST( TestGetComponent );
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ public:
|
|||||||
void TestDatabaseKeyword(void);
|
void TestDatabaseKeyword(void);
|
||||||
void TestDumpOn(void);
|
void TestDumpOn(void);
|
||||||
void TestDumpString(void);
|
void TestDumpString(void);
|
||||||
void TestGetDumpLineCount(void);
|
void TestGetDumpStringLineCount(void);
|
||||||
void TestGetDumpLine(void);
|
void TestGetDumpStringLine(void);
|
||||||
void TestGetComponentCount(void);
|
void TestGetComponentCount(void);
|
||||||
void TestGetComponent(void);
|
void TestGetComponent(void);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user