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
32
IPhreeqc.cpp
32
IPhreeqc.cpp
@ -169,6 +169,11 @@ size_t IPhreeqc::GetComponentCount(void)
|
||||
return this->Components.size();
|
||||
}
|
||||
|
||||
int IPhreeqc::GetCurrentSelectedOutputUserNumber(void)const
|
||||
{
|
||||
return this->CurrentSelectedOutputUserNumber;
|
||||
}
|
||||
|
||||
const char* IPhreeqc::GetDumpFileName(void)const
|
||||
{
|
||||
return this->DumpFileName.c_str();
|
||||
@ -295,6 +300,21 @@ bool IPhreeqc::GetLogStringOn(void)const
|
||||
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
|
||||
{
|
||||
return this->OutputFileName.c_str();
|
||||
@ -345,6 +365,11 @@ int IPhreeqc::GetSelectedOutputColumnCount(void)const
|
||||
return 0;
|
||||
}
|
||||
|
||||
int IPhreeqc::GetSelectedOutputCount(void)const
|
||||
{
|
||||
return this->PhreeqcPtr->SelectedOutput_map.size();
|
||||
}
|
||||
|
||||
const char* IPhreeqc::GetSelectedOutputFileName(void)const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
void IPhreeqc::SetCurrentSelectedOutputUserNumber(int n)
|
||||
VRESULT IPhreeqc::SetCurrentSelectedOutputUserNumber(int 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)
|
||||
|
||||
88
IPhreeqc.h
88
IPhreeqc.h
@ -69,7 +69,7 @@ extern "C" {
|
||||
* Internally used to create an error condition.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @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
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
@ -92,7 +92,7 @@ extern "C" {
|
||||
* Internally used to create a warning condition.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @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
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
@ -242,6 +242,25 @@ extern "C" {
|
||||
*/
|
||||
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.
|
||||
@ -493,7 +512,6 @@ extern "C" {
|
||||
*/
|
||||
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>.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
@ -624,6 +642,27 @@ extern "C" {
|
||||
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>.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
@ -768,6 +807,25 @@ extern "C" {
|
||||
*/
|
||||
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.
|
||||
@ -1573,6 +1631,30 @@ Headings
|
||||
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.
|
||||
* The default value is <B><I>dump.id.out</I></B>.
|
||||
|
||||
75
IPhreeqc.hpp
75
IPhreeqc.hpp
@ -73,7 +73,7 @@ public:
|
||||
* Appends the given error message and increments the error count.
|
||||
* Internally used to create an error condition.
|
||||
* @param error_msg The error message to display.
|
||||
* @returns The current error count.
|
||||
* @return The current error count.
|
||||
* @see GetErrorString, GetErrorStringLine, GetErrorStringLineCount, OutputErrorString
|
||||
*/
|
||||
size_t AddError(const char* error_msg);
|
||||
@ -82,7 +82,7 @@ public:
|
||||
* Appends the given warning message and increments the warning count.
|
||||
* Internally used to create a warning condition.
|
||||
* @param warning_msg The warning message to display.
|
||||
* @returns The current warning count.
|
||||
* @return The current warning count.
|
||||
* @see GetWarningString, GetWarningStringLine, GetWarningStringLineCount, OutputWarningString
|
||||
*/
|
||||
size_t AddWarning(const char* warning_msg);
|
||||
@ -96,7 +96,7 @@ public:
|
||||
/**
|
||||
* Retrieve the accumulated input string. The accumulated input string can be run
|
||||
* with \ref RunAccumulated.
|
||||
* @returns The accumulated input string.
|
||||
* @return The accumulated input string.
|
||||
* @see AccumulateLine, ClearAccumulatedLines, OutputAccumulatedLines, RunAccumulated
|
||||
*/
|
||||
const std::string& GetAccumulatedLines(void);
|
||||
@ -117,6 +117,12 @@ public:
|
||||
*/
|
||||
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.
|
||||
@ -273,6 +279,14 @@ public:
|
||||
*/
|
||||
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.
|
||||
* @return filename The name of the file to write phreeqc output to.
|
||||
@ -326,16 +340,22 @@ public:
|
||||
/**
|
||||
* Retrieves the number of columns in the selected-output buffer.
|
||||
* @return The number of columns.
|
||||
* @see GetSelectedOutputRowCount, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber
|
||||
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputRowCount, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber
|
||||
*/
|
||||
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.
|
||||
* 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.
|
||||
* @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;
|
||||
|
||||
@ -350,7 +370,7 @@ public:
|
||||
/**
|
||||
* Retrieves the number of rows in the selected-output buffer.
|
||||
* @return The number of rows.
|
||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
||||
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputValue, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
||||
*/
|
||||
int GetSelectedOutputRowCount(void)const;
|
||||
|
||||
@ -359,7 +379,7 @@ public:
|
||||
* @return A null terminated string containing <b>SELECTED_OUTPUT</b>.
|
||||
* @pre
|
||||
* \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;
|
||||
|
||||
@ -369,7 +389,7 @@ public:
|
||||
* @return A null terminated string containing the given line.
|
||||
* Returns an empty string if n is out of range.
|
||||
* @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);
|
||||
|
||||
@ -377,7 +397,7 @@ public:
|
||||
* Retrieves the number of lines in the current selected output string buffer.
|
||||
* @return The number of lines.
|
||||
* @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;
|
||||
|
||||
@ -399,7 +419,7 @@ public:
|
||||
* @retval VR_INVALIDCOL The given column is out of range.
|
||||
* @retval VR_OUTOFMEMORY Memory could not be allocated.
|
||||
* @retval VR_BADINSTANCE The given id is invalid.
|
||||
* @see GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputRowCount, GetSelectedOutputValue2, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
||||
* @see GetCurrentSelectedOutputUserNumber, GetSelectedOutputColumnCount, GetSelectedOutputFileOn, GetSelectedOutputRowCount, GetSelectedOutputValue2, SetCurrentSelectedOutputUserNumber, SetSelectedOutputFileOn
|
||||
* @remarks
|
||||
* Row 0 contains the column headings to the selected_ouput.
|
||||
* @par Examples:
|
||||
@ -655,6 +675,16 @@ public:
|
||||
*/
|
||||
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
|
||||
* 10 result = CALLBACK(x1, x2, string$)
|
||||
@ -676,14 +706,14 @@ public:
|
||||
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, char *str, int l));
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Sets the currently active SELECTED_OUTPUT 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.
|
||||
* @retval VR_OK Success
|
||||
* @retval VR_INVALIDARG The given user number has not been defined.
|
||||
* @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.
|
||||
@ -811,17 +841,6 @@ public:
|
||||
*/
|
||||
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:
|
||||
// overrides
|
||||
virtual void error_msg(const char *str, bool stop=false);
|
||||
|
||||
@ -106,6 +106,17 @@ GetComponentCount(int id)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
int
|
||||
GetCurrentSelectedOutputUserNumber(int id)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetCurrentSelectedOutputUserNumber();
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
const char*
|
||||
GetDumpFileName(int id)
|
||||
{
|
||||
@ -355,6 +366,22 @@ GetLogStringOn(int id)
|
||||
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*
|
||||
GetOutputFileName(int id)
|
||||
{
|
||||
@ -449,6 +476,17 @@ GetSelectedOutputColumnCount(int id)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputCount(int id)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetSelectedOutputCount();
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
const char*
|
||||
GetSelectedOutputFileName(int id)
|
||||
{
|
||||
@ -549,7 +587,7 @@ GetSelectedOutputValue(int id, int row, int col, VAR* pVAR)
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
switch(IPhreeqcPtr->GetSelectedOutputValue(row, col, pVAR))
|
||||
switch (IPhreeqcPtr->GetSelectedOutputValue(row, col, pVAR))
|
||||
{
|
||||
case VR_OK: return IPQ_OK;
|
||||
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);
|
||||
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_OUTOFMEMORY: return IPQ_OUTOFMEMORY;
|
||||
@ -737,6 +775,23 @@ SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str,
|
||||
}
|
||||
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
|
||||
SetDumpFileName(int id, const char* filename)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user