mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
added SetCurrentSelectedOutputUserNumber GetCurrentSelectedOutputUserNumber GetSelectedOutputCount GetNthSelectedOutputUserNumber
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8008 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
c12969725a
commit
f74d6d8fe7
34
IPhreeqc.cpp
34
IPhreeqc.cpp
@ -169,6 +169,11 @@ size_t IPhreeqc::GetComponentCount(void)
|
|||||||
return this->Components.size();
|
return this->Components.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IPhreeqc::GetCurrentSelectedOutputUserNumber(void)const
|
||||||
|
{
|
||||||
|
return this->CurrentSelectedOutputUserNumber;
|
||||||
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetDumpFileName(void)const
|
const char* IPhreeqc::GetDumpFileName(void)const
|
||||||
{
|
{
|
||||||
return this->DumpFileName.c_str();
|
return this->DumpFileName.c_str();
|
||||||
@ -295,6 +300,21 @@ bool IPhreeqc::GetLogStringOn(void)const
|
|||||||
return this->LogStringOn;
|
return this->LogStringOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IPhreeqc::GetNthSelectedOutputUserNumber(int n)const
|
||||||
|
{
|
||||||
|
int nth = VR_INVALIDARG;
|
||||||
|
std::map< int, SelectedOutput >::const_iterator ci = this->PhreeqcPtr->SelectedOutput_map.begin();
|
||||||
|
for (int i = 0; ci != this->PhreeqcPtr->SelectedOutput_map.end(); ++ci, ++i)
|
||||||
|
{
|
||||||
|
if (i == n)
|
||||||
|
{
|
||||||
|
nth = (*ci).first;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nth;
|
||||||
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetOutputFileName(void)const
|
const char* IPhreeqc::GetOutputFileName(void)const
|
||||||
{
|
{
|
||||||
return this->OutputFileName.c_str();
|
return this->OutputFileName.c_str();
|
||||||
@ -345,6 +365,11 @@ int IPhreeqc::GetSelectedOutputColumnCount(void)const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IPhreeqc::GetSelectedOutputCount(void)const
|
||||||
|
{
|
||||||
|
return this->PhreeqcPtr->SelectedOutput_map.size();
|
||||||
|
}
|
||||||
|
|
||||||
const char* IPhreeqc::GetSelectedOutputFileName(void)const
|
const char* IPhreeqc::GetSelectedOutputFileName(void)const
|
||||||
{
|
{
|
||||||
static const char empty[] = "";
|
static const char empty[] = "";
|
||||||
@ -784,9 +809,14 @@ void IPhreeqc::SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, cha
|
|||||||
this->PhreeqcPtr->register_fortran_basic_callback(fcn);
|
this->PhreeqcPtr->register_fortran_basic_callback(fcn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetCurrentSelectedOutputUserNumber(int n)
|
VRESULT IPhreeqc::SetCurrentSelectedOutputUserNumber(int n)
|
||||||
{
|
{
|
||||||
this->CurrentSelectedOutputUserNumber = n;
|
if (this->PhreeqcPtr->SelectedOutput_map.find(n) != this->PhreeqcPtr->SelectedOutput_map.end())
|
||||||
|
{
|
||||||
|
this->CurrentSelectedOutputUserNumber = n;
|
||||||
|
return VR_OK;
|
||||||
|
}
|
||||||
|
return VR_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPhreeqc::SetDumpFileName(const char *filename)
|
void IPhreeqc::SetDumpFileName(const char *filename)
|
||||||
|
|||||||
88
IPhreeqc.h
88
IPhreeqc.h
@ -69,7 +69,7 @@ extern "C" {
|
|||||||
* Internally used to create an error condition.
|
* Internally used to create an error condition.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @param error_msg The error message to display.
|
* @param error_msg The error message to display.
|
||||||
* @returns The current error count if successful; otherwise a negative value indicates an error occured (see \ref IPQ_RESULT).
|
* @return The current error count if successful; otherwise a negative value indicates an error occured (see \ref IPQ_RESULT).
|
||||||
* @see GetErrorString, GetErrorStringLine, GetErrorStringLineCount, OutputErrorString
|
* @see GetErrorString, GetErrorStringLine, GetErrorStringLineCount, OutputErrorString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
@ -92,7 +92,7 @@ extern "C" {
|
|||||||
* Internally used to create a warning condition.
|
* Internally used to create a warning condition.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
* @param warn_msg The warning message to display.
|
* @param warn_msg The warning message to display.
|
||||||
* @returns The current warning count if successful; otherwise a negative value indicates an error occured (see \ref IPQ_RESULT).
|
* @return The current warning count if successful; otherwise a negative value indicates an error occured (see \ref IPQ_RESULT).
|
||||||
* @see GetWarningString, GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
* @see GetWarningString, GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||||
* @par Fortran90 Interface:
|
* @par Fortran90 Interface:
|
||||||
* @htmlonly
|
* @htmlonly
|
||||||
@ -242,6 +242,25 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
IPQ_DLL_EXPORT int GetComponentCount(int id);
|
IPQ_DLL_EXPORT int GetComponentCount(int id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the currently active <b>SELECTED_OUTPUT</b> user number for use in subsequent calls to GetSelectedOutputXXX routines.
|
||||||
|
* The initial setting after calling \ref CreateIPhreeqc is 1.
|
||||||
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
|
* @return The current active <b>SELECTED_OUTPUT</b> user number.
|
||||||
|
* @see GetNthSelectedOutputUserNumber, GetSelectedOutputCount, SetCurrentSelectedOutputUserNumber
|
||||||
|
* @par Fortran90 Interface:
|
||||||
|
* @htmlonly
|
||||||
|
* <CODE>
|
||||||
|
* <PRE>
|
||||||
|
* FUNCTION GetCurrentSelectedOutputUserNumber(ID)
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
|
* INTEGER(KIND=4) :: GetCurrentSelectedOutputUserNumber
|
||||||
|
* END FUNCTION GetCurrentSelectedOutputUserNumber
|
||||||
|
* </PRE>
|
||||||
|
* </CODE>
|
||||||
|
* @endhtmlonly
|
||||||
|
*/
|
||||||
|
IPQ_DLL_EXPORT int GetCurrentSelectedOutputUserNumber(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
* Retrieves the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
||||||
@ -493,7 +512,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
IPQ_DLL_EXPORT int GetErrorStringOn(int id);
|
IPQ_DLL_EXPORT int GetErrorStringOn(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the log file. The default name is <B><I>phreeqc.id.log</I></B>.
|
* Retrieves the name of the log file. The default name is <B><I>phreeqc.id.log</I></B>.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
@ -624,6 +642,27 @@ extern "C" {
|
|||||||
IPQ_DLL_EXPORT int GetLogStringOn(int id);
|
IPQ_DLL_EXPORT int GetLogStringOn(int id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the nth user number of the currently defined <B>SELECTED_OUTPUT</B> keyword blocks.
|
||||||
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
|
* @return The nth defined user number; a negative value indicates an error occured.
|
||||||
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputCount, SetCurrentSelectedOutputUserNumber
|
||||||
|
* @par Fortran90 Interface:
|
||||||
|
* @htmlonly
|
||||||
|
* (Note: N is one-based for the Fortran interface.)
|
||||||
|
* <CODE>
|
||||||
|
* <PRE>
|
||||||
|
* FUNCTION GetNthSelectedOutputUserNumber(ID)
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
|
* INTEGER(KIND=4) :: GetNthSelectedOutputUserNumber
|
||||||
|
* END FUNCTION GetNthSelectedOutputUserNumber
|
||||||
|
* </PRE>
|
||||||
|
* </CODE>
|
||||||
|
* @endhtmlonly
|
||||||
|
*/
|
||||||
|
IPQ_DLL_EXPORT int GetNthSelectedOutputUserNumber(int id, int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the output file. The default name is <B><I>phreeqc.id.out</I></B>.
|
* Retrieves the name of the output file. The default name is <B><I>phreeqc.id.out</I></B>.
|
||||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
@ -768,6 +807,25 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
|
IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the count of <B>SELECTED_OUTPUT</B> blocks that are currently defined.
|
||||||
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
|
* @return The number of <B>SELECTED_OUTPUT</B> blocks.
|
||||||
|
* @see GetCurrentSelectedOutputUserNumber, GetNthSelectedOutputUserNumber, SetCurrentSelectedOutputUserNumber
|
||||||
|
* @par Fortran90 Interface:
|
||||||
|
* @htmlonly
|
||||||
|
* <CODE>
|
||||||
|
* <PRE>
|
||||||
|
* FUNCTION GetSelectedOutputCount(ID)
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
|
* INTEGER(KIND=4) :: GetSelectedOutputCount
|
||||||
|
* END FUNCTION GetSelectedOutputCount
|
||||||
|
* </PRE>
|
||||||
|
* </CODE>
|
||||||
|
* @endhtmlonly
|
||||||
|
*/
|
||||||
|
IPQ_DLL_EXPORT int GetSelectedOutputCount(int id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the selected output file. This file name is used if not specified within <B>SELECTED_OUTPUT</B> input.
|
* Retrieves the name of the selected output file. This file name is used if not specified within <B>SELECTED_OUTPUT</B> input.
|
||||||
@ -1573,6 +1631,30 @@ Headings
|
|||||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, int l));
|
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, int l));
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the currently active SELECTED_OUTPUT user number for use in subsequent calls to GetSelectedOutputXXX routines.
|
||||||
|
* The initial setting after calling \ref CreateIPhreeqc is 1.
|
||||||
|
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||||
|
* @param n The user number as specified in the <B>SELECTED_OUTPUT</B> block.
|
||||||
|
* @retval IPQ_OK Success.
|
||||||
|
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||||
|
* @retval IPQ_INVALIDARG The given user number is invalid.
|
||||||
|
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileName, GetSelectedOutputRowCount, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, GetSelectedOutputValue
|
||||||
|
* @par Fortran90 Interface:
|
||||||
|
* @htmlonly
|
||||||
|
* <CODE>
|
||||||
|
* <PRE>
|
||||||
|
* FUNCTION SetCurrentSelectedOutputUserNumber(ID,N)
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||||
|
* INTEGER(KIND=4), INTENT(IN) :: N
|
||||||
|
* INTEGER(KIND=4) :: SetCurrentSelectedOutputUserNumber
|
||||||
|
* END FUNCTION SetCurrentSelectedOutputUserNumber
|
||||||
|
* </PRE>
|
||||||
|
* </CODE>
|
||||||
|
* @endhtmlonly
|
||||||
|
*/
|
||||||
|
IPQ_DLL_EXPORT IPQ_RESULT SetCurrentSelectedOutputUserNumber(int id, int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
* Sets the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
||||||
* The default value is <B><I>dump.id.out</I></B>.
|
* The default value is <B><I>dump.id.out</I></B>.
|
||||||
|
|||||||
185
IPhreeqc.hpp
185
IPhreeqc.hpp
@ -47,9 +47,9 @@ class IPQ_DLL_EXPORT IPhreeqc : public PHRQ_io
|
|||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* \anchor IPhreeqc_cpp
|
* \anchor IPhreeqc_cpp
|
||||||
* @par Example:
|
* @par Example:
|
||||||
* \include IPhreeqc.cpp
|
* \include IPhreeqc.cpp
|
||||||
*/
|
*/
|
||||||
IPhreeqc(void);
|
IPhreeqc(void);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ public:
|
|||||||
* @param line The line(s) to add for input to phreeqc.
|
* @param line The line(s) to add for input to phreeqc.
|
||||||
* @retval VR_OK Success
|
* @retval VR_OK Success
|
||||||
* @retval VR_OUTOFMEMORY Out of memory
|
* @retval VR_OUTOFMEMORY Out of memory
|
||||||
* @see ClearAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
* @see ClearAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
||||||
*/
|
*/
|
||||||
VRESULT AccumulateLine(const char *line);
|
VRESULT AccumulateLine(const char *line);
|
||||||
|
|
||||||
@ -73,8 +73,8 @@ public:
|
|||||||
* Appends the given error message and increments the error count.
|
* Appends the given error message and increments the error count.
|
||||||
* Internally used to create an error condition.
|
* Internally used to create an error condition.
|
||||||
* @param error_msg The error message to display.
|
* @param error_msg The error message to display.
|
||||||
* @returns The current error count.
|
* @return The current error count.
|
||||||
* @see GetErrorString, GetErrorStringLine, GetErrorStringLineCount, OutputErrorString
|
* @see GetErrorString, GetErrorStringLine, GetErrorStringLineCount, OutputErrorString
|
||||||
*/
|
*/
|
||||||
size_t AddError(const char* error_msg);
|
size_t AddError(const char* error_msg);
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ public:
|
|||||||
* Appends the given warning message and increments the warning count.
|
* Appends the given warning message and increments the warning count.
|
||||||
* Internally used to create a warning condition.
|
* Internally used to create a warning condition.
|
||||||
* @param warning_msg The warning message to display.
|
* @param warning_msg The warning message to display.
|
||||||
* @returns The current warning count.
|
* @return The current warning count.
|
||||||
* @see GetWarningString, GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
* @see GetWarningString, GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||||
*/
|
*/
|
||||||
size_t AddWarning(const char* warning_msg);
|
size_t AddWarning(const char* warning_msg);
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Retrieve the accumulated input string. The accumulated input string can be run
|
* Retrieve the accumulated input string. The accumulated input string can be run
|
||||||
* with \ref RunAccumulated.
|
* with \ref RunAccumulated.
|
||||||
* @returns The accumulated input string.
|
* @return The accumulated input string.
|
||||||
* @see AccumulateLine, ClearAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
* @see AccumulateLine, ClearAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
||||||
*/
|
*/
|
||||||
const std::string& GetAccumulatedLines(void);
|
const std::string& GetAccumulatedLines(void);
|
||||||
@ -117,6 +117,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
size_t GetComponentCount(void);
|
size_t GetComponentCount(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the currently active SELECTED_OUTPUT user number.
|
||||||
|
* @return The current active SELECTED_OUTPUT user number.
|
||||||
|
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileName, GetSelectedOutputRowCount, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber
|
||||||
|
*/
|
||||||
|
int GetCurrentSelectedOutputUserNumber(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
* Retrieves the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
||||||
@ -128,15 +134,15 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.id.out</I></B> if unspecified, where id is obtained from \ref GetId) file.
|
* @retval true Output is written to the <B>DUMP</B> (<B><I>dump.id.out</I></B> if unspecified, where id is obtained from \ref GetId) file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see GetDumpStringLine, GetDumpStringLineCount, GetDumpStringOn, GetDumpString, SetDumpFileOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpStringLineCount, GetDumpStringOn, GetDumpString, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
bool GetDumpFileOn(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 receive <b>DUMP</b> output.
|
* \ref SetDumpStringOn must have been set to true in order to receive <b>DUMP</b> output.
|
||||||
* @see GetDumpStringLine, GetDumpFileOn, GetDumpStringLineCount, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
* @see GetDumpStringLine, GetDumpFileOn, GetDumpStringLineCount, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
||||||
@ -148,7 +154,7 @@ public:
|
|||||||
* @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 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 GetDumpFileOn, GetDumpString, GetDumpStringLineCount, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
* @see GetDumpFileOn, GetDumpString, GetDumpStringLineCount, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetDumpStringLine(int n);
|
const char* GetDumpStringLine(int n);
|
||||||
@ -156,15 +162,15 @@ public:
|
|||||||
/**
|
/**
|
||||||
* 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 GetDumpFileOn, GetDumpString, GetDumpStringLine, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
* @see GetDumpFileOn, GetDumpString, GetDumpStringLine, GetDumpStringOn, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
int GetDumpStringLineCount(void)const;
|
int GetDumpStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 GetDumpFileOn, GetDumpString, GetDumpStringLine, GetDumpStringLineCount, SetDumpFileOn, SetDumpStringOn
|
* @see GetDumpFileOn, GetDumpString, GetDumpStringLine, GetDumpStringLineCount, SetDumpFileOn, SetDumpStringOn
|
||||||
*/
|
*/
|
||||||
bool GetDumpStringOn(void)const;
|
bool GetDumpStringOn(void)const;
|
||||||
@ -178,22 +184,22 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.id.err</I></B> (where id is obtained from \ref GetId) file.
|
* @retval true Errors are written to the <B><I>phreeqc.id.err</I></B> (where id is obtained from \ref GetId) file.
|
||||||
* @retval false No errors are written.
|
* @retval false No errors are written.
|
||||||
* @see SetErrorFileOn
|
* @see SetErrorFileOn
|
||||||
*/
|
*/
|
||||||
bool GetErrorFileOn(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 GetErrorStringLine, GetErrorStringLineCount, GetErrorFileOn, OutputErrorString, SetErrorFileOn
|
* @see GetErrorStringLine, GetErrorStringLineCount, GetErrorFileOn, OutputErrorString, SetErrorFileOn
|
||||||
*/
|
*/
|
||||||
const char* GetErrorString(void);
|
const char* GetErrorString(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the given error line.
|
* Retrieves the given error line.
|
||||||
* @return A null terminated string containing the given line of the error string buffer.
|
* @return A null terminated string containing the given line of the error string buffer.
|
||||||
* @param n The zero-based index of the line to retrieve.
|
* @param n The zero-based index of the line to retrieve.
|
||||||
* @see GetErrorStringLineCount, OutputErrorString
|
* @see GetErrorStringLineCount, OutputErrorString
|
||||||
*/
|
*/
|
||||||
@ -201,15 +207,15 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 GetErrorStringLine, OutputErrorString
|
* @see GetErrorStringLine, OutputErrorString
|
||||||
*/
|
*/
|
||||||
int GetErrorStringLineCount(void)const;
|
int GetErrorStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the error string switch.
|
* Retrieves the current value of the error string switch.
|
||||||
* @retval true Error output is stored.
|
* @retval true Error output is stored.
|
||||||
* @retval false No error output is stored.
|
* @retval false No error output is stored.
|
||||||
* @see GetErrorFileOn, GetErrorString, GetErrorStringLine, GetErrorStringLineCount, SetErrorFileOn, SetErrorStringOn
|
* @see GetErrorFileOn, GetErrorString, GetErrorStringLine, GetErrorStringLineCount, SetErrorFileOn, SetErrorStringOn
|
||||||
*/
|
*/
|
||||||
bool GetErrorStringOn(void)const;
|
bool GetErrorStringOn(void)const;
|
||||||
@ -217,7 +223,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Retrieves the id of this object. Each instance receives an id which is incremented for each instance
|
* Retrieves the id of this object. Each instance receives an id which is incremented for each instance
|
||||||
* starting with the value zero.
|
* starting with the value zero.
|
||||||
* @return The id.
|
* @return The id.
|
||||||
*/
|
*/
|
||||||
int GetId(void)const;
|
int GetId(void)const;
|
||||||
|
|
||||||
@ -230,17 +236,17 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the log file switch.
|
* Retrieves the current value of the log file switch.
|
||||||
* @retval true Log messages are written to the <B><I>phreeqc.id.log</I></B> (where id is obtained from \ref GetId) file.
|
* @retval true Log messages are written to the <B><I>phreeqc.id.log</I></B> (where id is obtained from \ref GetId) file.
|
||||||
* @retval false No log messages are written.
|
* @retval false No log messages are written.
|
||||||
* @remarks
|
* @remarks
|
||||||
* Logging must be enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
* Logging must be enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
||||||
* @see SetLogFileOn
|
* @see SetLogFileOn
|
||||||
*/
|
*/
|
||||||
bool GetLogFileOn(void)const;
|
bool GetLogFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the string buffer containing phreeqc log output.
|
* Retrieves the string buffer containing phreeqc log output.
|
||||||
* @return A null terminated string containing log output.
|
* @return A null terminated string containing log output.
|
||||||
* @pre
|
* @pre
|
||||||
* \ref SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
* \ref SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
||||||
* @see GetLogStringLine, GetLogFileOn, GetLogStringLineCount, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
* @see GetLogStringLine, GetLogFileOn, GetLogStringLineCount, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
||||||
@ -252,7 +258,7 @@ public:
|
|||||||
* @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 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 SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
* @pre \ref SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
||||||
* @see GetLogFileOn, GetLogString, GetLogStringLineCount, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
* @see GetLogFileOn, GetLogString, GetLogStringLineCount, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetLogStringLine(int n)const;
|
const char* GetLogStringLine(int n)const;
|
||||||
@ -260,19 +266,27 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current log string buffer.
|
* Retrieves the number of lines in the current log string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @pre \ref SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
* @pre \ref SetLogStringOn must have been set to true and enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
||||||
* @see GetLogFileOn, GetLogString, GetLogStringLine, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
* @see GetLogFileOn, GetLogString, GetLogStringLine, GetLogStringOn, SetLogFileOn, SetLogStringOn
|
||||||
*/
|
*/
|
||||||
int GetLogStringLineCount(void)const;
|
int GetLogStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the log string switch.
|
* Retrieves the current value of the log string switch.
|
||||||
* @retval true Log output is stored.
|
* @retval true Log output is stored.
|
||||||
* @retval false No log output is stored.
|
* @retval false No log output is stored.
|
||||||
* @see GetLogFileOn, GetLogString, GetLogStringLine, GetLogStringLineCount, SetLogFileOn, SetLogStringOn
|
* @see GetLogFileOn, GetLogString, GetLogStringLine, GetLogStringLineCount, SetLogFileOn, SetLogStringOn
|
||||||
*/
|
*/
|
||||||
bool GetLogStringOn(void)const;
|
bool GetLogStringOn(void)const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the nth user number of the currently defined <B>SELECTED_OUTPUT</B> blocks.
|
||||||
|
* @param n The zero-based index of the <B>SELECTED_OUTPUT</B> user number to retrieve.
|
||||||
|
* @return The nth defined user number; a negative value indicates an error occured.
|
||||||
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputCount, SetCurrentSelectedOutputUserNumber
|
||||||
|
*/
|
||||||
|
int GetNthSelectedOutputUserNumber(int n)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the name of the output file. The default value is <B><I>phreeqc.id.out</I></B>, where id is obtained from \ref GetId.
|
* Retrieves the name of the output file. The default value is <B><I>phreeqc.id.out</I></B>, where id is obtained from \ref GetId.
|
||||||
* @return filename The name of the file to write phreeqc output to.
|
* @return filename The name of the file to write phreeqc output to.
|
||||||
@ -282,15 +296,15 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.id.out</I></B> (where id is obtained from \ref GetId) file.
|
* @retval true Output is written to the <B><I>phreeqc.id.out</I></B> (where id is obtained from \ref GetId) file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see GetOutputFileOn, GetOutputString, GetOutputStringOn, GetOutputStringLine, GetOutputStringLineCount, SetOutputFileName, SetOutputFileOn, SetOutputStringOn
|
* @see GetOutputFileOn, GetOutputString, GetOutputStringOn, GetOutputStringLine, GetOutputStringLineCount, SetOutputFileName, SetOutputFileOn, SetOutputStringOn
|
||||||
*/
|
*/
|
||||||
bool GetOutputFileOn(void)const;
|
bool GetOutputFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the string buffer containing phreeqc output.
|
* Retrieves the string buffer containing phreeqc output.
|
||||||
* @return A null terminated string containing phreeqc output.
|
* @return A null terminated string containing phreeqc output.
|
||||||
* @pre
|
* @pre
|
||||||
* \ref SetOutputStringOn must have been set to true in order to receive output.
|
* \ref SetOutputStringOn must have been set to true in order to receive output.
|
||||||
* @see GetOutputStringLine, GetOutputFileOn, GetOutputStringLineCount, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
* @see GetOutputStringLine, GetOutputFileOn, GetOutputStringLineCount, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
||||||
@ -302,7 +316,7 @@ public:
|
|||||||
* @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 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 SetOutputStringOn must have been set to true.
|
* @pre \ref SetOutputStringOn must have been set to true.
|
||||||
* @see GetOutputFileOn, GetOutputString, GetOutputStringLineCount, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
* @see GetOutputFileOn, GetOutputString, GetOutputStringLineCount, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetOutputStringLine(int n)const;
|
const char* GetOutputStringLine(int n)const;
|
||||||
@ -310,56 +324,62 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current output string buffer.
|
* Retrieves the number of lines in the current output string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @pre \ref SetOutputStringOn must have been set to true.
|
* @pre \ref SetOutputStringOn must have been set to true.
|
||||||
* @see GetOutputFileOn, GetOutputString, GetOutputStringLine, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
* @see GetOutputFileOn, GetOutputString, GetOutputStringLine, GetOutputStringOn, SetOutputFileOn, SetOutputStringOn
|
||||||
*/
|
*/
|
||||||
int GetOutputStringLineCount(void)const;
|
int GetOutputStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the output string switch.
|
* Retrieves the current value of the output string switch.
|
||||||
* @retval true Phreeqc output is stored.
|
* @retval true Phreeqc output is stored.
|
||||||
* @retval false No phreeqc output is stored.
|
* @retval false No phreeqc output is stored.
|
||||||
* @see GetOutputFileOn, GetOutputString, GetOutputStringLine, GetOutputStringLineCount, SetOutputFileOn, SetOutputStringOn
|
* @see GetOutputFileOn, GetOutputString, GetOutputStringLine, GetOutputStringLineCount, SetOutputFileOn, SetOutputStringOn
|
||||||
*/
|
*/
|
||||||
bool GetOutputStringOn(void)const;
|
bool GetOutputStringOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of columns in the selected-output buffer.
|
* Retrieves the number of columns in the selected-output buffer.
|
||||||
* @return The number of columns.
|
* @return The number of columns.
|
||||||
* @see GetSelectedOutputRowCount, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputRowCount, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber
|
||||||
*/
|
*/
|
||||||
int GetSelectedOutputColumnCount(void)const;
|
int GetSelectedOutputColumnCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Retrieves the count of <B>SELECTED_OUTPUT</B> blocks that are currently defined.
|
||||||
|
* @return The number of <B>SELECTED_OUTPUT</B> blocks.
|
||||||
|
* @see GetCurrentSelectedOutputUserNumber, GetNthSelectedOutputUserNumber, SetCurrentSelectedOutputUserNumber
|
||||||
|
*/
|
||||||
|
int GetSelectedOutputCount(void)const;
|
||||||
|
|
||||||
|
/**
|
||||||
* Retrieves the name of the selected output file. This file name is used if not specified within <B>SELECTED_OUTPUT</B> input.
|
* Retrieves the name of the selected output file. This file name is used if not specified within <B>SELECTED_OUTPUT</B> input.
|
||||||
* The default value is <B><I>selected.id.out</I></B>, where id is obtained from \ref GetId.
|
* The default value is <B><I>selected.id.out</I></B>, where id is obtained from \ref GetId.
|
||||||
* @return filename The name of the file to write to.
|
* @return filename The name of the file to write to.
|
||||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileName, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileName, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetSelectedOutputFileName(void)const;
|
const char* GetSelectedOutputFileName(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the selected-output file switch.
|
* Retrieves the selected-output file switch.
|
||||||
* @retval true Output is written to the selected-output (<B><I>selected.id.out</I></B> if unspecified, where id is obtained from \ref GetId) file.
|
* @retval true Output is written to the selected-output (<B><I>selected.id.out</I></B> if unspecified, where id is obtained from \ref GetId) file.
|
||||||
* @retval false No output is written.
|
* @retval false No output is written.
|
||||||
* @see GetSelectedOutputValue, GetSelectedOutputColumnCount, GetSelectedOutputRowCount, SetSelectedOutputFileOn
|
* @see GetSelectedOutputValue, GetSelectedOutputColumnCount, GetSelectedOutputRowCount, SetSelectedOutputFileOn
|
||||||
*/
|
*/
|
||||||
bool GetSelectedOutputFileOn(void)const;
|
bool GetSelectedOutputFileOn(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of rows in the selected-output buffer.
|
* Retrieves the number of rows in the selected-output buffer.
|
||||||
* @return The number of rows.
|
* @return The number of rows.
|
||||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
||||||
*/
|
*/
|
||||||
int GetSelectedOutputRowCount(void)const;
|
int GetSelectedOutputRowCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the string buffer containing <b>SELECTED_OUTPUT</b>.
|
* Retrieves the string buffer containing <b>SELECTED_OUTPUT</b>.
|
||||||
* @return A null terminated string containing <b>SELECTED_OUTPUT</b>.
|
* @return A null terminated string containing <b>SELECTED_OUTPUT</b>.
|
||||||
* @pre
|
* @pre
|
||||||
* \ref SetSelectedOutputStringOn must have been set to true in order to receive <b>SELECTED_OUTPUT</b>.
|
* \ref SetSelectedOutputStringOn must have been set to true in order to receive <b>SELECTED_OUTPUT</b>.
|
||||||
* @see GetSelectedOutputStringLine, GetSelectedOutputFileOn, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, GetSelectedOutputString, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputStringLine, GetSelectedOutputFileOn, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, GetSelectedOutputString, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetSelectedOutputString(void)const;
|
const char* GetSelectedOutputString(void)const;
|
||||||
|
|
||||||
@ -368,23 +388,23 @@ public:
|
|||||||
* @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 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 SetSelectedOutputStringOn must have been set to true.
|
* @pre \ref SetSelectedOutputStringOn must have been set to true.
|
||||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||||
*/
|
*/
|
||||||
const char* GetSelectedOutputStringLine(int n);
|
const char* GetSelectedOutputStringLine(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the number of lines in the current selected output string buffer.
|
* Retrieves the number of lines in the current selected output string buffer.
|
||||||
* @return The number of lines.
|
* @return The number of lines.
|
||||||
* @pre \ref SetSelectedOutputStringOn must have been set to true.
|
* @pre \ref SetSelectedOutputStringOn must have been set to true.
|
||||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringOn, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringOn, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||||
*/
|
*/
|
||||||
int GetSelectedOutputStringLineCount(void)const;
|
int GetSelectedOutputStringLineCount(void)const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current value of the selected output string switch.
|
* Retrieves the current value of the selected output string switch.
|
||||||
* @retval true Output defined by the <B>SELECTED_OUTPUT</B> keyword is stored.
|
* @retval true Output defined by the <B>SELECTED_OUTPUT</B> keyword is stored.
|
||||||
* @retval false No output is stored.
|
* @retval false No output is stored.
|
||||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||||
*/
|
*/
|
||||||
bool GetSelectedOutputStringOn(void)const;
|
bool GetSelectedOutputStringOn(void)const;
|
||||||
@ -399,7 +419,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, GetSelectedOutputFileOn, GetSelectedOutputRowCount, GetSelectedOutputValue2, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputRowCount, GetSelectedOutputValue2, SetCurrentSelectedOutputUserNumber, 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:
|
||||||
@ -566,22 +586,22 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
* @see GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||||
*/
|
*/
|
||||||
const char* GetWarningString(void);
|
const char* GetWarningString(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 GetWarningStringLineCount, OutputWarningString
|
* @see GetWarningStringLineCount, OutputWarningString
|
||||||
*/
|
*/
|
||||||
const char* GetWarningStringLine(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 GetWarningStringLine, GetWarningString, OutputWarningString
|
* @see GetWarningStringLine, GetWarningString, OutputWarningString
|
||||||
*/
|
*/
|
||||||
int GetWarningStringLineCount(void)const;
|
int GetWarningStringLineCount(void)const;
|
||||||
@ -601,7 +621,7 @@ public:
|
|||||||
* @return The number of errors encountered.
|
* @return The number of errors encountered.
|
||||||
* @see LoadDatabaseString
|
* @see LoadDatabaseString
|
||||||
* @remarks
|
* @remarks
|
||||||
* All previous definitions are cleared.
|
* All previous definitions are cleared.
|
||||||
*/
|
*/
|
||||||
int LoadDatabase(const char* filename);
|
int LoadDatabase(const char* filename);
|
||||||
|
|
||||||
@ -611,12 +631,12 @@ public:
|
|||||||
* @return The number of errors encountered.
|
* @return The number of errors encountered.
|
||||||
* @see LoadDatabaseString
|
* @see LoadDatabaseString
|
||||||
* @remarks
|
* @remarks
|
||||||
* All previous definitions are cleared.
|
* All previous definitions are cleared.
|
||||||
*/
|
*/
|
||||||
int LoadDatabaseString(const char* input);
|
int LoadDatabaseString(const char* input);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 OutputAccumulatedLines(void);
|
void OutputAccumulatedLines(void);
|
||||||
@ -655,6 +675,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
int RunFile(const char* filename);
|
int RunFile(const char* filename);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs the specified string as input to phreeqc.
|
||||||
|
* @param input String containing phreeqc input.
|
||||||
|
* @return The number of errors encountered during the run.
|
||||||
|
* @see RunAccumulated, RunFile
|
||||||
|
* @pre
|
||||||
|
* \ref LoadDatabase/\ref LoadDatabaseString must have been called and returned 0 (zero) errors.
|
||||||
|
*/
|
||||||
|
int RunString(const char* input);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a C callback function for Basic programs. The syntax for the Basic command is
|
* Sets a C callback function for Basic programs. The syntax for the Basic command is
|
||||||
* 10 result = CALLBACK(x1, x2, string$)
|
* 10 result = CALLBACK(x1, x2, string$)
|
||||||
@ -676,14 +706,14 @@ public:
|
|||||||
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, char *str, int l));
|
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, char *str, int l));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the specified string as input to phreeqc.
|
* Sets the currently active SELECTED_OUTPUT user number for use in subsequent calls to GetSelectedOutputXXX routines.
|
||||||
* @param input String containing phreeqc input.
|
* The initial setting is 1.
|
||||||
* @return The number of errors encountered during the run.
|
* @param n The user number as specified in the <B>SELECTED_OUTPUT</B> block.
|
||||||
* @see RunAccumulated, RunFile
|
* @retval VR_OK Success
|
||||||
* @pre
|
* @retval VR_INVALIDARG The given user number has not been defined.
|
||||||
* \ref LoadDatabase/\ref LoadDatabaseString must have been called and returned 0 (zero) errors.
|
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputColumnCount, GetSelectedOutputFileName, GetSelectedOutputRowCount, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, GetSelectedOutputValue
|
||||||
*/
|
*/
|
||||||
int RunString(const char* input);
|
VRESULT SetCurrentSelectedOutputUserNumber(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
* Sets the name of the dump file. This file name is used if not specified within <B>DUMP</B> input.
|
||||||
@ -747,8 +777,8 @@ public:
|
|||||||
* 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 <B><I>phreeqc.id.log</I></B> (where id is obtained from \ref GetId) file. The initial setting is false.
|
* writes log messages to the <B><I>phreeqc.id.log</I></B> (where id is obtained from \ref GetId) file. The initial setting is false.
|
||||||
* @param bValue If true, turns on output to the log file; if false, no log messages are written to the log file.
|
* @param bValue If true, turns on output to the log file; if false, no log messages are written to the log file.
|
||||||
* @remarks
|
* @remarks
|
||||||
* Logging must be enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
* Logging must be enabled through the use of the KNOBS -logfile option in order to receive any log messages.
|
||||||
* @see GetLogFileOn
|
* @see GetLogFileOn
|
||||||
*/
|
*/
|
||||||
void SetLogFileOn(bool bValue);
|
void SetLogFileOn(bool bValue);
|
||||||
@ -811,17 +841,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetSelectedOutputStringOn(bool bValue);
|
void SetSelectedOutputStringOn(bool bValue);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the given user number for use in subsequent calls to GetSelectedOutputXXX routines.
|
|
||||||
* The initial setting is 1.
|
|
||||||
* @param n The user number as specified in the <B>SELECTED_OUTPUT</B> block.
|
|
||||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileName, GetSelectedOutputRowCount, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, GetSelectedOutputValue
|
|
||||||
*/
|
|
||||||
void SetCurrentSelectedOutputUserNumber(int n);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// overrides
|
// overrides
|
||||||
virtual void error_msg(const char *str, bool stop=false);
|
virtual void error_msg(const char *str, bool stop=false);
|
||||||
|
|||||||
@ -106,6 +106,17 @@ GetComponentCount(int id)
|
|||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
GetCurrentSelectedOutputUserNumber(int id)
|
||||||
|
{
|
||||||
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
|
if (IPhreeqcPtr)
|
||||||
|
{
|
||||||
|
return IPhreeqcPtr->GetCurrentSelectedOutputUserNumber();
|
||||||
|
}
|
||||||
|
return IPQ_BADINSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetDumpFileName(int id)
|
GetDumpFileName(int id)
|
||||||
{
|
{
|
||||||
@ -355,6 +366,22 @@ GetLogStringOn(int id)
|
|||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
GetNthSelectedOutputUserNumber(int id, int n)
|
||||||
|
{
|
||||||
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
|
if (IPhreeqcPtr)
|
||||||
|
{
|
||||||
|
int nth = IPhreeqcPtr->GetNthSelectedOutputUserNumber(n);
|
||||||
|
switch (nth)
|
||||||
|
{
|
||||||
|
case VR_INVALIDARG: return IPQ_INVALIDARG;
|
||||||
|
}
|
||||||
|
return nth;
|
||||||
|
}
|
||||||
|
return IPQ_BADINSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetOutputFileName(int id)
|
GetOutputFileName(int id)
|
||||||
{
|
{
|
||||||
@ -449,6 +476,17 @@ GetSelectedOutputColumnCount(int id)
|
|||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
GetSelectedOutputCount(int id)
|
||||||
|
{
|
||||||
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
|
if (IPhreeqcPtr)
|
||||||
|
{
|
||||||
|
return IPhreeqcPtr->GetSelectedOutputCount();
|
||||||
|
}
|
||||||
|
return IPQ_BADINSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
GetSelectedOutputFileName(int id)
|
GetSelectedOutputFileName(int id)
|
||||||
{
|
{
|
||||||
@ -549,7 +587,7 @@ GetSelectedOutputValue(int id, int row, int col, VAR* pVAR)
|
|||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
switch(IPhreeqcPtr->GetSelectedOutputValue(row, col, pVAR))
|
switch (IPhreeqcPtr->GetSelectedOutputValue(row, col, pVAR))
|
||||||
{
|
{
|
||||||
case VR_OK: return IPQ_OK;
|
case VR_OK: return IPQ_OK;
|
||||||
case VR_OUTOFMEMORY: return IPQ_OUTOFMEMORY;
|
case VR_OUTOFMEMORY: return IPQ_OUTOFMEMORY;
|
||||||
@ -570,7 +608,7 @@ GetSelectedOutputValue2(int id, int row, int col, int *vtype, double* dvalue, ch
|
|||||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
if (IPhreeqcPtr)
|
if (IPhreeqcPtr)
|
||||||
{
|
{
|
||||||
switch(IPhreeqcPtr->GetSelectedOutputValue2(row, col, vtype, dvalue, svalue, svalue_length))
|
switch (IPhreeqcPtr->GetSelectedOutputValue2(row, col, vtype, dvalue, svalue, svalue_length))
|
||||||
{
|
{
|
||||||
case VR_OK: return IPQ_OK;
|
case VR_OK: return IPQ_OK;
|
||||||
case VR_OUTOFMEMORY: return IPQ_OUTOFMEMORY;
|
case VR_OUTOFMEMORY: return IPQ_OUTOFMEMORY;
|
||||||
@ -737,6 +775,23 @@ SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str,
|
|||||||
}
|
}
|
||||||
return IPQ_BADINSTANCE;
|
return IPQ_BADINSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IPQ_RESULT
|
||||||
|
SetCurrentSelectedOutputUserNumber(int id, int n)
|
||||||
|
{
|
||||||
|
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||||
|
if (IPhreeqcPtr)
|
||||||
|
{
|
||||||
|
switch (IPhreeqcPtr->SetCurrentSelectedOutputUserNumber(n))
|
||||||
|
{
|
||||||
|
case VR_INVALIDARG: return IPQ_INVALIDARG;
|
||||||
|
case VR_OK: return IPQ_OK;
|
||||||
|
default: assert(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return IPQ_BADINSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
IPQ_RESULT
|
IPQ_RESULT
|
||||||
SetDumpFileName(int id, const char* filename)
|
SetDumpFileName(int id, const char* filename)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user