mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
added fortran Error; SelectedOutput methods
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/ErrorHandling@6077 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
a69da2dd27
commit
3d1ee8f9e5
93
IPhreeqc.cpp
93
IPhreeqc.cpp
@ -23,7 +23,7 @@ IPhreeqc::IPhreeqc(void)
|
||||
: DatabaseLoaded(false)
|
||||
, ClearAccumulated(false)
|
||||
, UpdateComponents(true)
|
||||
, SelectedOutputOn(false)
|
||||
, SelectedOutputFileOn(false)
|
||||
, OutputFileOn(false)
|
||||
, LogFileOn(false)
|
||||
, ErrorFileOn(false)
|
||||
@ -35,6 +35,7 @@ IPhreeqc::IPhreeqc(void)
|
||||
, ErrorReporter(0)
|
||||
, WarningReporter(0)
|
||||
, SelectedOutput(0)
|
||||
, SelectedOutputStringOn(false)
|
||||
, PhreeqcPtr(0)
|
||||
, input_file(0)
|
||||
, database_file(0)
|
||||
@ -54,7 +55,7 @@ IPhreeqc::IPhreeqc(void)
|
||||
std::pair<std::map<size_t, IPhreeqc*>::iterator, bool> pr = IPhreeqc::Instances.insert(instance);
|
||||
|
||||
::sprintf(buffer, PUNCH_FILENAME_FORMAT, this->Index);
|
||||
this->PunchFileName = buffer;
|
||||
this->SelectedOutputFileName = buffer;
|
||||
|
||||
::sprintf(buffer, OUTPUT_FILENAME_FORMAT, this->Index);
|
||||
this->OutputFileName = buffer;
|
||||
@ -323,9 +324,14 @@ int IPhreeqc::GetSelectedOutputColumnCount(void)const
|
||||
return (int)this->SelectedOutput->GetColCount();
|
||||
}
|
||||
|
||||
const char* IPhreeqc::GetSelectedOutputFileName(void)const
|
||||
{
|
||||
return this->SelectedOutputFileName.c_str();
|
||||
}
|
||||
|
||||
bool IPhreeqc::GetSelectedOutputFileOn(void)const
|
||||
{
|
||||
return this->SelectedOutputOn;
|
||||
return this->SelectedOutputFileOn;
|
||||
}
|
||||
|
||||
int IPhreeqc::GetSelectedOutputRowCount(void)const
|
||||
@ -333,6 +339,36 @@ int IPhreeqc::GetSelectedOutputRowCount(void)const
|
||||
return (int)this->SelectedOutput->GetRowCount();
|
||||
}
|
||||
|
||||
const char* IPhreeqc::GetSelectedOutputString(void)const
|
||||
{
|
||||
static const char err_msg[] = "GetSelectedOutputString: SelectedOutputStringOn not set.\n";
|
||||
if (!this->SelectedOutputStringOn)
|
||||
{
|
||||
return err_msg;
|
||||
}
|
||||
return this->SelectedOutputString.c_str();
|
||||
}
|
||||
|
||||
const char* IPhreeqc::GetSelectedOutputStringLine(int n)
|
||||
{
|
||||
static const char empty[] = "";
|
||||
if (n < 0 || n >= this->GetSelectedOutputStringLineCount())
|
||||
{
|
||||
return empty;
|
||||
}
|
||||
return this->SelectedOutputLines[n].c_str();
|
||||
}
|
||||
|
||||
int IPhreeqc::GetSelectedOutputStringLineCount(void)const
|
||||
{
|
||||
return (int)this->SelectedOutputLines.size();
|
||||
}
|
||||
|
||||
bool IPhreeqc::GetSelectedOutputStringOn(void)const
|
||||
{
|
||||
return this->SelectedOutputStringOn;
|
||||
}
|
||||
|
||||
VRESULT IPhreeqc::GetSelectedOutputValue(int row, int col, VAR* pVAR)
|
||||
{
|
||||
this->ErrorReporter->Clear();
|
||||
@ -718,9 +754,22 @@ void IPhreeqc::SetOutputFileOn(bool bValue)
|
||||
this->OutputFileOn = bValue;
|
||||
}
|
||||
|
||||
void IPhreeqc::SetSelectedOutputFileName(const char *filename)
|
||||
{
|
||||
if (filename && ::strlen(filename))
|
||||
{
|
||||
this->SelectedOutputFileName = filename;
|
||||
}
|
||||
}
|
||||
|
||||
void IPhreeqc::SetSelectedOutputFileOn(bool bValue)
|
||||
{
|
||||
this->SelectedOutputOn = bValue;
|
||||
this->SelectedOutputFileOn = bValue;
|
||||
}
|
||||
|
||||
void IPhreeqc::SetSelectedOutputStringOn(bool bValue)
|
||||
{
|
||||
this->SelectedOutputStringOn = bValue;
|
||||
}
|
||||
|
||||
void IPhreeqc::UnLoadDatabase(void)
|
||||
@ -747,6 +796,8 @@ void IPhreeqc::UnLoadDatabase(void)
|
||||
//
|
||||
ASSERT(this->SelectedOutput);
|
||||
this->SelectedOutput->Clear();
|
||||
this->SelectedOutputString.clear();
|
||||
this->SelectedOutputLines.clear();
|
||||
|
||||
// clear dump string
|
||||
//
|
||||
@ -887,7 +938,7 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
// TRUE ???
|
||||
//
|
||||
//
|
||||
if (!this->SelectedOutputOn)
|
||||
if (!this->SelectedOutputFileOn)
|
||||
{
|
||||
ASSERT(!this->punch_ostream);
|
||||
}
|
||||
@ -904,14 +955,14 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
{
|
||||
if (this->PhreeqcPtr->punch.new_def == FALSE)
|
||||
{
|
||||
if (this->SelectedOutputOn && !this->punch_ostream)
|
||||
if (this->SelectedOutputFileOn && !this->punch_ostream)
|
||||
{
|
||||
//
|
||||
// LoadDatabase
|
||||
// do_run -- containing SELECTED_OUTPUT ****TODO**** check -file option
|
||||
// another do_run without SELECTED_OUTPUT
|
||||
//
|
||||
std::string filename = this->PunchFileName;
|
||||
std::string filename = this->SelectedOutputFileName;
|
||||
if (!this->punch_open(filename.c_str()))
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -928,7 +979,7 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this->SelectedOutputOn && !this->punch_ostream)
|
||||
if (this->SelectedOutputFileOn && !this->punch_ostream)
|
||||
{
|
||||
// This is a special case which could not occur in
|
||||
// phreeqc
|
||||
@ -937,7 +988,7 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
// do_run -- containing SELECTED_OUTPUT ****TODO**** check -file option
|
||||
// another do_run with SELECTED_OUTPUT
|
||||
//
|
||||
std::string filename = this->PunchFileName;
|
||||
std::string filename = this->SelectedOutputFileName;
|
||||
if (!this->punch_open(filename.c_str()))
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -955,7 +1006,7 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
}
|
||||
}
|
||||
|
||||
if (!this->SelectedOutputOn) ASSERT(!this->punch_ostream);
|
||||
if (!this->SelectedOutputFileOn) ASSERT(!this->punch_ostream);
|
||||
/* the converse is not necessarily true */
|
||||
|
||||
this->PhreeqcPtr->n_user_punch_index = -1;
|
||||
@ -1106,6 +1157,17 @@ void IPhreeqc::do_run(const char* sz_routine, std::istream* pis, PFN_PRERUN_CALL
|
||||
this->OutputLines.push_back(line);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->SelectedOutputStringOn)
|
||||
{
|
||||
// output lines
|
||||
std::istringstream iss(this->SelectedOutputString);
|
||||
std::string line;
|
||||
while (std::getline(iss, line))
|
||||
{
|
||||
this->SelectedOutputLines.push_back(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IPhreeqc::update_errors(void)
|
||||
@ -1189,6 +1251,11 @@ void IPhreeqc::screen_msg(const char *err_str)
|
||||
|
||||
void IPhreeqc::punch_msg(const char *str)
|
||||
{
|
||||
if (this->SelectedOutputStringOn && this->punch_on)
|
||||
{
|
||||
this->SelectedOutputString += str;
|
||||
}
|
||||
ASSERT(!(this->SelectedOutputFileOn ^ (this->punch_ostream != 0)));
|
||||
this->PHRQ_io::punch_msg(str);
|
||||
}
|
||||
|
||||
@ -1299,11 +1366,11 @@ bool IPhreeqc::punch_open(const char *file_name, std::ios_base::openmode mode)
|
||||
{
|
||||
if (file_name && this->PhreeqcPtr->have_punch_name)
|
||||
{
|
||||
this->PunchFileName = file_name;
|
||||
this->SelectedOutputFileName = file_name;
|
||||
}
|
||||
if (this->SelectedOutputOn)
|
||||
if (this->SelectedOutputFileOn)
|
||||
{
|
||||
return this->PHRQ_io::punch_open(this->PunchFileName.c_str(), mode);
|
||||
return this->PHRQ_io::punch_open(this->SelectedOutputFileName.c_str(), mode);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
164
IPhreeqc.h
164
IPhreeqc.h
@ -761,6 +761,27 @@ extern "C" {
|
||||
IPQ_DLL_EXPORT int GetSelectedOutputColumnCount(int id);
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @return filename The name of the file to write <B>SELECTED_OUTPUT</B> output to.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileName, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* SUBROUTINE GetSelectedOutputFileName(ID,FILENAME)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* CHARACTER(LEN=*), INTENT(OUT) :: FILENAME
|
||||
* END SUBROUTINE GetSelectedOutputFileName
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*/
|
||||
IPQ_DLL_EXPORT const char* GetSelectedOutputFileName(int id);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the selected-output file switch.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
@ -781,6 +802,95 @@ extern "C" {
|
||||
IPQ_DLL_EXPORT int GetSelectedOutputFileOn(int id);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the string buffer containing <b>SELECTED_OUTPUT</b>.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @return A null terminated string containing <b>SELECTED_OUTPUT</b>.
|
||||
* @pre \ref SetSelectedOutputStringOn must have been set to true (non-zero) in order to recieve <b>SELECTED_OUTPUT</b>.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, GetSelectedOutputStringOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* Not implemented. (see \ref GetSelectedOutputStringLineCount, \ref GetSelectedOutputStringLine)
|
||||
*
|
||||
* \anchor GetSelectedOutputString_c
|
||||
* @par C Example:
|
||||
* \include GetSelectedOutputString.c
|
||||
*/
|
||||
IPQ_DLL_EXPORT const char* GetSelectedOutputString(int id);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the given selected output line.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @param n The zero-based index of the line to retrieve.
|
||||
* @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 (non-zero).
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* (Note: N is one-based for the Fortran interface.)
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* SUBROUTINE GetSelectedOutputStringLine(ID,N,LINE)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* INTEGER(KIND=4), INTENT(IN) :: N
|
||||
* CHARACTER(LEN=*), INTENT(OUT) :: LINE
|
||||
* END SUBROUTINE GetSelectedOutputStringLine
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*
|
||||
* \anchor GetSelectedOutputStringLine_f90
|
||||
* @par Fortran90 Example:
|
||||
* \include F90GetSelectedOutputStringLine.f90
|
||||
*/
|
||||
IPQ_DLL_EXPORT const char* GetSelectedOutputStringLine(int id, int n);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the number of lines in the current selected output string buffer.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @return The number of lines.
|
||||
* @pre \ref SetSelectedOutputStringOn must have been set to true (non-zero).
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringOn, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* FUNCTION GetSelectedOutputStringLineCount(ID)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* INTEGER(KIND=4) :: GetSelectedOutputStringLineCount
|
||||
* END FUNCTION GetSelectedOutputStringLineCount
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*
|
||||
* @par Fortran90 Example:
|
||||
* see \ref GetSelectedOutputStringLine_f90 "GetSelectedOutputStringLine"
|
||||
*/
|
||||
IPQ_DLL_EXPORT int GetSelectedOutputStringLineCount(int id);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the current value of the selected output string switch.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @return Non-zero if output defined by the <B>SELECTED_OUTPUT</B> keyword is stored, 0 (zero) otherwise.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* FUNCTION GetSelectedOutputStringOn(ID)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* LOGICAL(KIND=4) :: GetSelectedOutputStringOn
|
||||
* END FUNCTION GetSelectedOutputStringOn
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*/
|
||||
IPQ_DLL_EXPORT int GetSelectedOutputStringOn(int id);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the number of rows in the selected-output buffer.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
@ -1559,6 +1669,30 @@ Headings
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetOutputStringOn(int id, int output_string_on);
|
||||
|
||||
|
||||
/**
|
||||
* Sets 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>.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @param filename The name of the file to write <B>SELECTED_OUTPUT</B> output to.
|
||||
* @retval IPQ_OK Success.
|
||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||
* @see GetSelectedOutputFileName, GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* FUNCTION SetSelectedOutputFileName(ID,FILENAME)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* CHARACTER(LEN=*), INTENT(OUT) :: FILENAME
|
||||
* INTEGER(KIND=4) :: SetSelectedOutputFileName
|
||||
* END FUNCTION SetSelectedOutputFileName
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*/
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileName(int id, const char* filename);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the selected-output file switch on or off. This switch controls whether or not phreeqc writes output to
|
||||
* the <B>SELECTED_OUTPUT</B> (<B><I>selected.id.out</I></B> if unspecified) file. The initial setting after calling \ref CreateIPhreeqc is off.
|
||||
@ -1582,6 +1716,36 @@ Headings
|
||||
*/
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
|
||||
|
||||
/**
|
||||
* Sets the selected output string switch on or off. This switch controls whether or not the data normally sent
|
||||
* to the selected output file are stored in a buffer for retrieval. The initial setting after calling
|
||||
* \ref CreateIPhreeqc is off.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @param dump_string_on If non-zero, captures the output defined by the <B>SELECTED_OUTPUT</B> keyword into a string buffer;
|
||||
* if zero, output defined by the <B>SELECTED_OUTPUT</B> keyword is not captured to a string buffer.
|
||||
* @retval IPQ_OK Success.
|
||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputStringOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
* <PRE>
|
||||
* FUNCTION SetSelectedOutputStringOn(ID,SELECTED_OUTPUT_STRING_ON)
|
||||
* INTEGER(KIND=4), INTENT(IN) :: ID
|
||||
* LOGICAL(KIND=4), INTENT(IN) :: SELECTED_OUTPUT_STRING_ON
|
||||
* INTEGER(KIND=4) :: SetSelectedOutputStringOn
|
||||
* END FUNCTION SetSelectedOutputStringOn
|
||||
* </PRE>
|
||||
* </CODE>
|
||||
* @endhtmlonly
|
||||
*
|
||||
* @par C Example:
|
||||
* see \ref GetSelectedOutputString_c "GetSelectedOutputString"
|
||||
*
|
||||
* @par Fortran90 Example:
|
||||
* see \ref GetSelectedOutputStringLine_f90 "GetSelectedOutputStringLine"
|
||||
*/
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputStringOn(int id, int dump_string_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);
|
||||
|
||||
|
||||
70
IPhreeqc.hpp
70
IPhreeqc.hpp
@ -329,6 +329,15 @@ public:
|
||||
*/
|
||||
int GetSelectedOutputColumnCount(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, SetSelectedOutputFileName, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
*/
|
||||
const char* GetSelectedOutputFileName(void)const;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
@ -344,6 +353,41 @@ public:
|
||||
*/
|
||||
int GetSelectedOutputRowCount(void)const;
|
||||
|
||||
/**
|
||||
* Retrieves the string buffer containing <b>SELECTED_OUTPUT</b>.
|
||||
* @return A null terminated string containing <b>SELECTED_OUTPUT</b>.
|
||||
* @pre
|
||||
* \ref SetSelectedOutputStringOn must have been set to true in order to recieve <b>SELECTED_OUTPUT</b>.
|
||||
* @see GetSelectedOutputStringLine, GetSelectedOutputFileOn, GetSelectedOutputStringLineCount, GetSelectedOutputStringOn, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
*/
|
||||
const char* GetSelectedOutputString(void)const;
|
||||
|
||||
/**
|
||||
* Retrieves the given selected output line.
|
||||
* @param n The zero-based index of the line to retrieve.
|
||||
* @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, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
*/
|
||||
const char* GetSelectedOutputStringLine(int n);
|
||||
|
||||
/**
|
||||
* 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, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
*/
|
||||
int GetSelectedOutputStringLineCount(void)const;
|
||||
|
||||
/**
|
||||
* Retrieves the current value of the selected output string switch.
|
||||
* @retval true Output defined by the <B>SELECTED_OUTPUT</B> keyword is stored.
|
||||
* @retval false No output is stored.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn, SetSelectedOutputStringOn
|
||||
*/
|
||||
bool GetSelectedOutputStringOn(void)const;
|
||||
|
||||
/**
|
||||
* Returns the \c VAR associated with the specified row and column.
|
||||
* @param row The row index.
|
||||
@ -699,6 +743,14 @@ public:
|
||||
*/
|
||||
void SetOutputStringOn(bool bValue);
|
||||
|
||||
/**
|
||||
* Sets 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.
|
||||
* @param filename The name of the file to write <B>SELECTED_OUTPUT</B> output to.
|
||||
* @see GetSelectedOutputFileName, GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputStringOn
|
||||
*/
|
||||
void SetSelectedOutputFileName(const char *filename);
|
||||
|
||||
/**
|
||||
* Sets the selected-output file switch on or off. This switch controls whether or not phreeqc writes output to
|
||||
* the <B>SELECTED_OUTPUT</B> (<B><I>selected.id.out</I></B> if unspecified, where id is obtained from \ref GetId) file.
|
||||
@ -708,6 +760,16 @@ public:
|
||||
*/
|
||||
void SetSelectedOutputFileOn(bool bValue);
|
||||
|
||||
/**
|
||||
* Sets the selected output string switch on or off. This switch controls whether or not the data normally sent
|
||||
* to the selected output file are stored in a buffer for retrieval. The initial setting is false.
|
||||
* @param bValue If true, captures the output defined by the <B>SELECTED_OUTPUT</B> keyword into a string buffer;
|
||||
* if false, output defined by the <B>SELECTED_OUTPUT</B> keyword is not captured to a string buffer.
|
||||
* @see GetSelectedOutputFileOn, GetSelectedOutputString, GetSelectedOutputStringOn, GetSelectedOutputStringLine, GetSelectedOutputStringLineCount, SetSelectedOutputFileOn
|
||||
*/
|
||||
void SetSelectedOutputStringOn(bool bValue);
|
||||
|
||||
|
||||
public:
|
||||
// overrides
|
||||
virtual void error_msg(const char *str, bool stop=false);
|
||||
@ -749,7 +811,7 @@ protected:
|
||||
bool DatabaseLoaded;
|
||||
bool ClearAccumulated;
|
||||
bool UpdateComponents;
|
||||
bool SelectedOutputOn;
|
||||
bool SelectedOutputFileOn;
|
||||
bool OutputFileOn;
|
||||
|
||||
bool LogFileOn;
|
||||
@ -783,12 +845,16 @@ protected:
|
||||
|
||||
std::list< std::string > Components;
|
||||
|
||||
std::string PunchFileName;
|
||||
std::string SelectedOutputFileName;
|
||||
std::string OutputFileName;
|
||||
std::string ErrorFileName;
|
||||
std::string LogFileName;
|
||||
std::string DumpFileName;
|
||||
|
||||
bool SelectedOutputStringOn;
|
||||
std::string SelectedOutputString;
|
||||
std::vector< std::string > SelectedOutputLines;
|
||||
|
||||
protected:
|
||||
Phreeqc* PhreeqcPtr;
|
||||
FILE *input_file;
|
||||
|
||||
99
IPhreeqcF.f
99
IPhreeqcF.f
@ -117,6 +117,13 @@
|
||||
GetDumpStringOn = .TRUE.
|
||||
ENDIF
|
||||
END FUNCTION GetDumpStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SUBROUTINE GetErrorFileName(ID,FNAME)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
CHARACTER(LEN=*) :: FNAME
|
||||
CALL GetErrorFileNameF(ID,FNAME)
|
||||
END SUBROUTINE GetErrorFileName
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetErrorFileOn(ID)
|
||||
IMPLICIT NONE
|
||||
@ -149,6 +156,18 @@
|
||||
INTEGER(KIND=4) :: GetErrorStringLineCountF
|
||||
GetErrorStringLineCount = GetErrorStringLineCountF(ID)
|
||||
END FUNCTION GetErrorStringLineCount
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetErrorStringOn(ID)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
LOGICAL(KIND=4) :: GetErrorStringOn
|
||||
INTEGER(KIND=4) :: GetErrorStringOnF
|
||||
IF (GetErrorStringOnF(ID).EQ.0) THEN
|
||||
GetErrorStringOn = .FALSE.
|
||||
ELSE
|
||||
GetErrorStringOn = .TRUE.
|
||||
ENDIF
|
||||
END FUNCTION GetErrorStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SUBROUTINE GetLogFileName(ID,FNAME)
|
||||
IMPLICIT NONE
|
||||
@ -259,6 +278,13 @@
|
||||
INTEGER(KIND=4) :: GetSelectedOutputColumnCountF
|
||||
GetSelectedOutputColumnCount = GetSelectedOutputColumnCountF(ID)
|
||||
END FUNCTION GetSelectedOutputColumnCount
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SUBROUTINE GetSelectedOutputFileName(ID,FNAME)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
CHARACTER(LEN=*) :: FNAME
|
||||
CALL GetSelectedOutputFileNameF(ID,FNAME)
|
||||
END SUBROUTINE GetSelectedOutputFileName
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputFileOn(ID)
|
||||
IMPLICIT NONE
|
||||
@ -279,6 +305,38 @@
|
||||
INTEGER(KIND=4) :: GetSelectedOutputRowCountF
|
||||
GetSelectedOutputRowCount = GetSelectedOutputRowCountF(ID)
|
||||
END FUNCTION GetSelectedOutputRowCount
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputStringLine(ID,N,LINE)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
INTEGER(KIND=4) :: N
|
||||
CHARACTER(LEN=*) :: LINE
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringLine
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringLineF
|
||||
GetSelectedOutputStringLine =
|
||||
& GetSelectedOutputStringLineF(ID,N,LINE)
|
||||
END FUNCTION GetSelectedOutputStringLine
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputStringLineCount(ID)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringLineCount
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringLineCountF
|
||||
GetSelectedOutputStringLineCount =
|
||||
& GetSelectedOutputStringLineCountF(ID)
|
||||
END FUNCTION GetSelectedOutputStringLineCount
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputStringOn(ID)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
LOGICAL(KIND=4) :: GetSelectedOutputStringOn
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringOnF
|
||||
IF (GetSelectedOutputStringOnF(ID).EQ.0) THEN
|
||||
GetSelectedOutputStringOn = .FALSE.
|
||||
ELSE
|
||||
GetSelectedOutputStringOn = .TRUE.
|
||||
ENDIF
|
||||
END FUNCTION GetSelectedOutputStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputValue(ID,ROW,COL,VTYPE,DVALUE,SVALUE)
|
||||
IMPLICIT NONE
|
||||
@ -402,6 +460,15 @@
|
||||
INTEGER(KIND=4) :: SetDumpStringOnF
|
||||
SetDumpStringOn = SetDumpStringOnF(ID,DUMP_STRING_ON)
|
||||
END FUNCTION SetDumpStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetErrorFileName(ID,FNAME)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
CHARACTER(LEN=*) :: FNAME
|
||||
INTEGER(KIND=4) :: SetErrorFileName
|
||||
INTEGER(KIND=4) :: SetErrorFileNameF
|
||||
SetErrorFileName = SetErrorFileNameF(ID,FNAME)
|
||||
END FUNCTION SetErrorFileName
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetErrorFileOn(ID,ERROR_ON)
|
||||
IMPLICIT NONE
|
||||
@ -448,13 +515,13 @@
|
||||
SetOutputFileName = SetOutputFileNameF(ID,FNAME)
|
||||
END FUNCTION SetOutputFileName
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetOutputFileOn(ID,OUTPUT_ON)
|
||||
FUNCTION SetOutputFileOn(ID,OUTPUT_FILE_ON)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
LOGICAL(KIND=4) :: OUTPUT_ON
|
||||
LOGICAL(KIND=4) :: OUTPUT_FILE_ON
|
||||
INTEGER(KIND=4) :: SetOutputFileOn
|
||||
INTEGER(KIND=4) :: SetOutputFileOnF
|
||||
SetOutputFileOn = SetOutputFileOnF(ID,OUTPUT_ON)
|
||||
SetOutputFileOn = SetOutputFileOnF(ID,OUTPUT_FILE_ON)
|
||||
END FUNCTION SetOutputFileOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetOutputStringOn(ID,OUTPUT_STRING_ON)
|
||||
@ -465,13 +532,35 @@
|
||||
INTEGER(KIND=4) :: SetOutputStringOnF
|
||||
SetOutputStringOn = SetOutputStringOnF(ID,OUTPUT_STRING_ON)
|
||||
END FUNCTION SetOutputStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetSelectedOutputFileName(ID,FNAME)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
CHARACTER(LEN=*) :: FNAME
|
||||
INTEGER(KIND=4) :: SetSelectedOutputFileName
|
||||
INTEGER(KIND=4) :: SetSelectedOutputFileNameF
|
||||
SetSelectedOutputFileName = SetSelectedOutputFileNameF(ID,FNAME)
|
||||
END FUNCTION SetSelectedOutputFileName
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION SetSelectedOutputFileOn(ID,SELECTED_ON)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
LOGICAL(KIND=4) :: SELECTED_ON
|
||||
INTEGER(KIND=4) :: SetSelectedOutputFileOn
|
||||
INTEGER(KIND=4) :: SetSelOutFileOnF
|
||||
SetSelectedOutputFileOn = SetSelOutFileOnF(ID,SELECTED_ON)
|
||||
INTEGER(KIND=4) :: SetSelectedOutputFileOnF
|
||||
SetSelectedOutputFileOn = SetSelectedOutputFileOnF(ID,
|
||||
& SELECTED_ON)
|
||||
END FUNCTION SetSelectedOutputFileOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION GetSelectedOutputStringOn(ID)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
LOGICAL(KIND=4) :: GetSelectedOutputStringOn
|
||||
INTEGER(KIND=4) :: GetSelectedOutputStringOnF
|
||||
IF (GetSelectedOutputStringOnF(ID).EQ.0) THEN
|
||||
GetSelectedOutputStringOn = .FALSE.
|
||||
ELSE
|
||||
GetSelectedOutputStringOn = .TRUE.
|
||||
ENDIF
|
||||
END FUNCTION GetSelectedOutputStringOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
@ -447,6 +447,18 @@ GetSelectedOutputColumnCount(int id)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
const char*
|
||||
GetSelectedOutputFileName(int id)
|
||||
{
|
||||
static const char empty[] = "";
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetSelectedOutputFileName();
|
||||
}
|
||||
return empty;
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputFileOn(int id)
|
||||
{
|
||||
@ -476,6 +488,59 @@ GetSelectedOutputRowCount(int id)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
const char*
|
||||
GetSelectedOutputString(int id)
|
||||
{
|
||||
static const char empty[] = "";
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetSelectedOutputString();
|
||||
}
|
||||
return empty;
|
||||
}
|
||||
|
||||
const char*
|
||||
GetSelectedOutputStringLine(int id, int n)
|
||||
{
|
||||
static const char err_msg[] = "GetSelectedOutputStringLine: Invalid instance id.\n";
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetSelectedOutputStringLine(n);
|
||||
}
|
||||
return err_msg;
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputStringLineCount(int id)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
return IPhreeqcPtr->GetSelectedOutputStringLineCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputStringOn(int id)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
if (IPhreeqcPtr->GetSelectedOutputStringOn())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
GetSelectedOutputValue(int id, int row, int col, VAR* pVAR)
|
||||
{
|
||||
@ -770,6 +835,18 @@ SetOutputStringOn(int id, int value)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputFileName(int id, const char* filename)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
IPhreeqcPtr->SetSelectedOutputFileName(filename);
|
||||
return IPQ_OK;
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputFileOn(int id, int value)
|
||||
{
|
||||
@ -782,6 +859,18 @@ SetSelectedOutputFileOn(int id, int value)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputStringOn(int id, int value)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
IPhreeqcPtr->SetSelectedOutputStringOn(value != 0);
|
||||
return IPQ_OK;
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
// helper functions
|
||||
//
|
||||
|
||||
|
||||
137
fwrap.cpp
137
fwrap.cpp
@ -154,6 +154,12 @@ GetDumpStringOnF(int *id)
|
||||
return ::GetDumpStringOn(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetErrorFileNameF(int *id, char* fname, unsigned int fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetErrorFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetErrorFileOnF(int *id)
|
||||
{
|
||||
@ -176,6 +182,12 @@ GetErrorStringLineF(int *id, int* n, char* line, unsigned int line_length)
|
||||
padfstring(line, ::GetErrorStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetErrorStringOnF(int *id)
|
||||
{
|
||||
return ::GetErrorStringOn(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetLogFileNameF(int *id, char* fname, unsigned int fname_length)
|
||||
{
|
||||
@ -242,12 +254,40 @@ GetSelectedOutputColumnCountF(int *id)
|
||||
return ::GetSelectedOutputColumnCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetSelectedOutputFileNameF(int *id, char* fname, unsigned int fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetSelectedOutputFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputFileOnF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputFileOn(*id);
|
||||
}
|
||||
|
||||
/*
|
||||
GetSelectedOutputStringF
|
||||
*/
|
||||
|
||||
int
|
||||
GetSelectedOutputStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetSelectedOutputStringLineF(int *id, int* n, char* line, unsigned int line_length)
|
||||
{
|
||||
padfstring(line, ::GetSelectedOutputStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputStringOnF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputStringOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputRowCountF(int *id)
|
||||
{
|
||||
@ -439,9 +479,32 @@ SetDumpStringOnF(int *id, int* dump_string_on)
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorFileOnF(int *id, int* error_on)
|
||||
SetErrorFileNameF(int *id, char* fname, unsigned int fname_length)
|
||||
{
|
||||
return ::SetErrorFileOn(*id, *error_on);
|
||||
char* cinput;
|
||||
|
||||
cinput = f2cstring(fname, fname_length);
|
||||
if (!cinput)
|
||||
{
|
||||
::AddError(*id, "SetErrorFileName: Out of memory.\n");
|
||||
return IPQ_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
IPQ_RESULT n = ::SetErrorFileName(*id, cinput);
|
||||
free(cinput);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorFileOnF(int *id, int* error_file_on)
|
||||
{
|
||||
return ::SetErrorFileOn(*id, *error_file_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorStringOnF(int *id, int* error_string_on)
|
||||
{
|
||||
return ::SetErrorStringOn(*id, *error_string_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
@ -503,11 +566,34 @@ SetOutputStringOnF(int *id, int* output_string_on)
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelOutFileOnF(int *id, int* sel_on)
|
||||
SetSelectedOutputFileNameF(int *id, char* fname, unsigned int fname_length)
|
||||
{
|
||||
char* cinput;
|
||||
|
||||
cinput = f2cstring(fname, fname_length);
|
||||
if (!cinput)
|
||||
{
|
||||
::AddError(*id, "SetSelectedOutputFileName: Out of memory.\n");
|
||||
return IPQ_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
IPQ_RESULT n = ::SetSelectedOutputFileName(*id, cinput);
|
||||
free(cinput);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputFileOnF(int *id, int* sel_on)
|
||||
{
|
||||
return ::SetSelectedOutputFileOn(*id, *sel_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputStringOnF(int *id, int* dump_string_on)
|
||||
{
|
||||
return ::SetSelectedOutputStringOn(*id, *dump_string_on);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(_M_AMD64)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -570,6 +656,10 @@ IPQ_DLL_EXPORT int __stdcall GETDUMPSTRINGON(int *id)
|
||||
{
|
||||
return GetDumpStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void __stdcall GETERRORFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETERRORFILEON(int *id)
|
||||
{
|
||||
return GetErrorFileOnF(id);
|
||||
@ -583,6 +673,10 @@ IPQ_DLL_EXPORT int __stdcall GETERRORSTRINGLINECOUNT(int *id)
|
||||
{
|
||||
return GetErrorStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETERRORSTRINGON(int *id)
|
||||
{
|
||||
return GetErrorStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void __stdcall GETLOGFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetLogFileNameF(id, filename, len);
|
||||
@ -629,6 +723,10 @@ IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputColumnCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void __stdcall GETSELECTEDOUTPUTFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTFILEON(int *id)
|
||||
{
|
||||
return GetSelectedOutputFileOnF(id);
|
||||
@ -637,6 +735,19 @@ IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTROWCOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputRowCountF(id);
|
||||
}
|
||||
// GetSelectedOutputString
|
||||
IPQ_DLL_EXPORT void __stdcall GETSELECTEDOUTPUTSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||
{
|
||||
GetSelectedOutputStringLineF(id, n, line, line_length);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTSTRINGLINECOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTSTRINGON(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall GETSELECTEDOUTPUTVALUE(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length)
|
||||
{
|
||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||
@ -694,10 +805,18 @@ IPQ_DLL_EXPORT int __stdcall SETDUMPSTRINGON(int *id, int *dump_string_on)
|
||||
{
|
||||
return SetDumpStringOnF(id, dump_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETERRORFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETERRORFILEON(int *id, int *error_on)
|
||||
{
|
||||
return SetErrorFileOnF(id, error_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETERRORSTRINGON(int *id, int *error_string_on)
|
||||
{
|
||||
return SetErrorStringOnF(id, error_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETLOGFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetLogFileNameF(id, filename, len);
|
||||
@ -722,9 +841,17 @@ IPQ_DLL_EXPORT int __stdcall SETOUTPUTSTRINGON(int *id, int *output_on)
|
||||
{
|
||||
return SetOutputStringOnF(id, output_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||
IPQ_DLL_EXPORT int __stdcall SETSELECTEDOUTPUTFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetSelOutFileOnF(id, selected_on);
|
||||
return SetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETSELECTEDOUTPUTFILEON(int *id, int *selout_file_on)
|
||||
{
|
||||
return SetSelectedOutputFileOnF(id, selout_file_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall SETSELECTEDOUTPUTSTRINGON(int *id, int *selout_string_on)
|
||||
{
|
||||
return SetSelectedOutputStringOnF(id, selout_string_on);
|
||||
}
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
136
fwrap.h
136
fwrap.h
@ -8,57 +8,67 @@
|
||||
#endif
|
||||
|
||||
#if defined(FC_FUNC)
|
||||
#define AccumulateLineF FC_FUNC (accumulatelinef, ACCUMULATELINEF)
|
||||
#define AddErrorF FC_FUNC (adderrorf, ADDERRORF)
|
||||
#define AddWarningF FC_FUNC (addwarningf, ADDWARNINGF)
|
||||
#define ClearAccumulatedLinesF FC_FUNC (clearaccumulatedlinesf, CLEARACCUMULATEDLINESF)
|
||||
#define CreateIPhreeqcF FC_FUNC (createiphreeqcf, CREATEIPHREEQCF)
|
||||
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
||||
#define GetDumpStringLineCountF FC_FUNC (getdumpstringlinecountf, GETDUMPSTRINGLINECOUNTF)
|
||||
#define GetDumpStringLineF FC_FUNC (getdumpstringlinef, GETDUMPSTRINGLINEF)
|
||||
#define GetDumpFileNameF FC_FUNC (getdumpfilenamef, GETDUMPFILENAMEF)
|
||||
#define GetDumpFileOnF FC_FUNC (getdumpfileonf, GETDUMPFILEONF)
|
||||
#define GetDumpStringOnF FC_FUNC (getdumpstringonf, GETDUMPSTRINGONF)
|
||||
#define GetErrorStringLineCountF FC_FUNC (geterrorstringlinecountf, GETERRORSTRINGLINECOUNTF)
|
||||
#define GetErrorStringLineF FC_FUNC (geterrorstringlinef, GETERRORSTRINGLINEF)
|
||||
#define GetErrorFileOnF FC_FUNC (geterrorfileonf, GETERRORFILEONF)
|
||||
#define GetLogFileNameF FC_FUNC (getlogfilenamef, GETLOGFILENAMEF)
|
||||
#define GetLogFileOnF FC_FUNC (getlogfileonf, GETLOGFILEONF)
|
||||
#define GetLogStringLineCountF FC_FUNC (getlogstringlinecountf, GETLOGSTRINGLINECOUNTF)
|
||||
#define GetLogStringLineF FC_FUNC (getlogstringlinef, GETLOGSTRINGLINEF)
|
||||
#define GetLogStringOnF FC_FUNC (getlogstringonf, GETLOGSTRINGONF)
|
||||
#define GetOutputFileNameF FC_FUNC (getoutputfilenamef, GETOUTPUTFILENAMEF)
|
||||
#define GetOutputFileOnF FC_FUNC (getoutputfileonf, GETOUTPUTFILEONF)
|
||||
#define GetOutputStringLineF FC_FUNC (getoutputstringlinef, GETOUTPUTSTRINGLINEF)
|
||||
#define GetOutputStringLineCountF FC_FUNC (getoutputstringlinecountf, GETOUTPUTSTRINGLINECOUNTF)
|
||||
#define GetOutputStringOnF FC_FUNC (getoutputstringonf, GETOUTPUTSTRINGONF)
|
||||
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||
#define GetSelectedOutputFileOnF FC_FUNC (getselectedoutputfileonf, GETSELECTEDOUTPUTFILEONF)
|
||||
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||
#define GetWarningStringLineCountF FC_FUNC (getwarningstringlinecountf, GETWARNINGSTRINGLINECOUNTF)
|
||||
#define GetWarningStringLineF FC_FUNC (getwarningstringlinef, GETWARNINGSTRINGLINEF)
|
||||
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
||||
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||
#define OutputErrorStringF FC_FUNC (outputerrorstringf, OUTPUTERRORSTRINGF)
|
||||
#define OutputAccumulatedLinesF FC_FUNC (outputaccumulatedlinesf, OUTPUTACCUMULATEDLINESF)
|
||||
#define OutputWarningStringF FC_FUNC (outputwarningstringf, OUTPUTWARNINGSTRINGF)
|
||||
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
||||
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
||||
#define SetDumpFileNameF FC_FUNC (setdumpfilenamef, SETDUMPFILENAMEF)
|
||||
#define SetDumpFileOnF FC_FUNC (setdumpfileonf, SETDUMPFILEONF)
|
||||
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||
#define SetErrorFileOnF FC_FUNC (seterrorfileonf, SETERRORFILEONF)
|
||||
#define SetLogFileNameF FC_FUNC (setlogfilenamef, SETLOGFILENAMEF)
|
||||
#define SetLogFileOnF FC_FUNC (setlogfileonf, SETLOGFILEONF)
|
||||
#define SetLogStringOnF FC_FUNC (setlogstringonf, SETLOGSTRINGONF)
|
||||
#define SetOutputFileNameF FC_FUNC (setoutputfilenamef, SETOUTPUTFILENAMEF)
|
||||
#define SetOutputFileOnF FC_FUNC (setoutputfileonf, SETOUTPUTFILEONF)
|
||||
#define SetOutputStringOnF FC_FUNC (setoutputstringonf, SETOUTPUTSTRINGONF)
|
||||
#define SetSelOutFileOnF FC_FUNC (setseloutfileonf, SETSELOUTFILEONF)
|
||||
#define AccumulateLineF FC_FUNC (accumulatelinef, ACCUMULATELINEF)
|
||||
#define AddErrorF FC_FUNC (adderrorf, ADDERRORF)
|
||||
#define AddWarningF FC_FUNC (addwarningf, ADDWARNINGF)
|
||||
#define ClearAccumulatedLinesF FC_FUNC (clearaccumulatedlinesf, CLEARACCUMULATEDLINESF)
|
||||
#define CreateIPhreeqcF FC_FUNC (createiphreeqcf, CREATEIPHREEQCF)
|
||||
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
||||
#define GetDumpFileNameF FC_FUNC (getdumpfilenamef, GETDUMPFILENAMEF)
|
||||
#define GetDumpFileOnF FC_FUNC (getdumpfileonf, GETDUMPFILEONF)
|
||||
#define GetDumpStringLineCountF FC_FUNC (getdumpstringlinecountf, GETDUMPSTRINGLINECOUNTF)
|
||||
#define GetDumpStringLineF FC_FUNC (getdumpstringlinef, GETDUMPSTRINGLINEF)
|
||||
#define GetDumpStringOnF FC_FUNC (getdumpstringonf, GETDUMPSTRINGONF)
|
||||
#define GetErrorFileNameF FC_FUNC (geterrorfilenamef, GETERRORFILENAMEF)
|
||||
#define GetErrorFileOnF FC_FUNC (geterrorfileonf, GETERRORFILEONF)
|
||||
#define GetErrorStringLineCountF FC_FUNC (geterrorstringlinecountf, GETERRORSTRINGLINECOUNTF)
|
||||
#define GetErrorStringLineF FC_FUNC (geterrorstringlinef, GETERRORSTRINGLINEF)
|
||||
#define GetErrorStringOnF FC_FUNC (geterrorstringonf, GETERRORSTRINGONF)
|
||||
#define GetLogFileNameF FC_FUNC (getlogfilenamef, GETLOGFILENAMEF)
|
||||
#define GetLogFileOnF FC_FUNC (getlogfileonf, GETLOGFILEONF)
|
||||
#define GetLogStringLineCountF FC_FUNC (getlogstringlinecountf, GETLOGSTRINGLINECOUNTF)
|
||||
#define GetLogStringLineF FC_FUNC (getlogstringlinef, GETLOGSTRINGLINEF)
|
||||
#define GetLogStringOnF FC_FUNC (getlogstringonf, GETLOGSTRINGONF)
|
||||
#define GetOutputFileNameF FC_FUNC (getoutputfilenamef, GETOUTPUTFILENAMEF)
|
||||
#define GetOutputFileOnF FC_FUNC (getoutputfileonf, GETOUTPUTFILEONF)
|
||||
#define GetOutputStringLineCountF FC_FUNC (getoutputstringlinecountf, GETOUTPUTSTRINGLINECOUNTF)
|
||||
#define GetOutputStringLineF FC_FUNC (getoutputstringlinef, GETOUTPUTSTRINGLINEF)
|
||||
#define GetOutputStringOnF FC_FUNC (getoutputstringonf, GETOUTPUTSTRINGONF)
|
||||
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||
#define GetSelectedOutputFileNameF FC_FUNC (getselectedoutputfilenamef, GETSELECTEDOUTPUTFILENAMEF)
|
||||
#define GetSelectedOutputFileOnF FC_FUNC (getselectedoutputfileonf, GETSELECTEDOUTPUTFILEONF)
|
||||
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||
#define GetSelectedOutputStringLineCountF FC_FUNC (getselectedoutputstringlinecountf, GETSELECTEDOUTPUTSTRINGLINECOUNTF)
|
||||
#define GetSelectedOutputStringLineF FC_FUNC (getselectedoutputstringlinef, GETSELECTEDOUTPUTSTRINGLINEF)
|
||||
#define GetSelectedOutputStringOnF FC_FUNC (getselectedoutputstringonf, GETSELECTEDOUTPUTSTRINGONF)
|
||||
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||
#define GetWarningStringLineCountF FC_FUNC (getwarningstringlinecountf, GETWARNINGSTRINGLINECOUNTF)
|
||||
#define GetWarningStringLineF FC_FUNC (getwarningstringlinef, GETWARNINGSTRINGLINEF)
|
||||
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
||||
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||
#define OutputAccumulatedLinesF FC_FUNC (outputaccumulatedlinesf, OUTPUTACCUMULATEDLINESF)
|
||||
#define OutputErrorStringF FC_FUNC (outputerrorstringf, OUTPUTERRORSTRINGF)
|
||||
#define OutputWarningStringF FC_FUNC (outputwarningstringf, OUTPUTWARNINGSTRINGF)
|
||||
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
||||
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
||||
#define SetDumpFileNameF FC_FUNC (setdumpfilenamef, SETDUMPFILENAMEF)
|
||||
#define SetDumpFileOnF FC_FUNC (setdumpfileonf, SETDUMPFILEONF)
|
||||
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||
#define SetErrorFileNameF FC_FUNC (seterrorfilenamef, SETERRORFILENAMEF)
|
||||
#define SetErrorFileOnF FC_FUNC (seterrorfileonf, SETERRORFILEONF)
|
||||
#define SetErrorStringOnF FC_FUNC (seterrorstringonf, SETERRORSTRINGONF)
|
||||
#define SetLogFileNameF FC_FUNC (setlogfilenamef, SETLOGFILENAMEF)
|
||||
#define SetLogFileOnF FC_FUNC (setlogfileonf, SETLOGFILEONF)
|
||||
#define SetLogStringOnF FC_FUNC (setlogstringonf, SETLOGSTRINGONF)
|
||||
#define SetOutputFileNameF FC_FUNC (setoutputfilenamef, SETOUTPUTFILENAMEF)
|
||||
#define SetOutputFileOnF FC_FUNC (setoutputfileonf, SETOUTPUTFILEONF)
|
||||
#define SetOutputStringOnF FC_FUNC (setoutputstringonf, SETOUTPUTSTRINGONF)
|
||||
#define SetSelectedOutputFileNameF FC_FUNC (setselectedoutputfilenamef, SETSELECTEDOUTPUTFILENAMEF)
|
||||
#define SetSelectedOutputFileOnF FC_FUNC (setselectedoutputfileonf, SETSELECTEDOUTPUTFILEONF)
|
||||
#define SetSelectedOutputStringOnF FC_FUNC (setselectedoutputstringonf, SETSELECTEDOUTPUTSTRINGONF)
|
||||
#endif /* FC_FUNC */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -73,14 +83,16 @@ extern "C" {
|
||||
int DestroyIPhreeqcF(int *id);
|
||||
int GetComponentCountF(int *id);
|
||||
void GetComponentF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int GetDumpStringLineCountF(int *id);
|
||||
void GetDumpStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
void GetDumpFileNameF(int *id, char* filename, unsigned int filename_length);
|
||||
int GetDumpFileOnF(int *id);
|
||||
int GetDumpStringLineCountF(int *id);
|
||||
void GetDumpStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int GetDumpStringOnF(int *id);
|
||||
void GetErrorFileNameF(int *id, char* filename, unsigned int filename_length);
|
||||
int GetErrorFileOnF(int *id);
|
||||
int GetErrorStringLineCountF(int *id);
|
||||
void GetErrorStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int GetErrorFileOnF(int *id);
|
||||
int GetErrorStringOnF(int *id);
|
||||
void GetLogFileNameF(int *id, char* filename, unsigned int filename_length);
|
||||
int GetLogFileOnF(int *id);
|
||||
int GetLogStringLineCountF(int *id);
|
||||
@ -92,15 +104,19 @@ extern "C" {
|
||||
void GetOutputStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int GetOutputStringOnF(int *id);
|
||||
int GetSelectedOutputColumnCountF(int *id);
|
||||
void GetSelectedOutputFileNameF(int *id, char* filename, unsigned int filename_length);
|
||||
int GetSelectedOutputFileOnF(int *id);
|
||||
int GetSelectedOutputRowCountF(int *id);
|
||||
int GetSelectedOutputStringLineCountF(int *id);
|
||||
void GetSelectedOutputStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int GetSelectedOutputStringOnF(int *id);
|
||||
IPQ_RESULT GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length);
|
||||
int GetWarningStringLineCountF(int *id);
|
||||
void GetWarningStringLineF(int *id, int* n, char* line, unsigned int line_length);
|
||||
int LoadDatabaseF(int *id, char* filename, unsigned int filename_length);
|
||||
int LoadDatabaseStringF(int *id, char* input, unsigned int input_length);
|
||||
void OutputErrorStringF(int *id);
|
||||
void OutputAccumulatedLinesF(int *id);
|
||||
void OutputErrorStringF(int *id);
|
||||
void OutputWarningStringF(int *id);
|
||||
int RunAccumulatedF(int *id);
|
||||
int RunFileF(int *id, char* filename, unsigned int filename_length);
|
||||
@ -108,14 +124,18 @@ extern "C" {
|
||||
IPQ_RESULT SetDumpFileNameF(int *id, char* fname, unsigned int fname_length);
|
||||
IPQ_RESULT SetDumpFileOnF(int *id, int* dump_on);
|
||||
IPQ_RESULT SetDumpStringOnF(int *id, int* dump_string_on);
|
||||
IPQ_RESULT SetErrorFileOnF(int *id, int* error_on);
|
||||
IPQ_RESULT SetErrorFileNameF(int *id, char* fname, unsigned int fname_length);
|
||||
IPQ_RESULT SetErrorFileOnF(int *id, int* error_file_on);
|
||||
IPQ_RESULT SetErrorStringOnF(int *id, int* error_string_on);
|
||||
IPQ_RESULT SetLogFileNameF(int *id, char* fname, unsigned int fname_length);
|
||||
IPQ_RESULT SetLogFileOnF(int *id, int* log_on);
|
||||
IPQ_RESULT SetLogFileOnF(int *id, int* log_file_on);
|
||||
IPQ_RESULT SetLogStringOnF(int *id, int* log_string_on);
|
||||
IPQ_RESULT SetOutputFileNameF(int *id, char* fname, unsigned int fname_length);
|
||||
IPQ_RESULT SetOutputFileOnF(int *id, int* output_on);
|
||||
IPQ_RESULT SetOutputStringOnF(int *id, int* output_string_on);
|
||||
IPQ_RESULT SetSelOutFileOnF(int *id, int* selected_output_on);
|
||||
IPQ_RESULT SetSelectedOutputFileNameF(int *id, char* fname, unsigned int fname_length);
|
||||
IPQ_RESULT SetSelectedOutputFileOnF(int *id, int* selected_output_file_on);
|
||||
IPQ_RESULT SetSelectedOutputStringOnF(int *id, int* selected_output_string_on);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
45
fwrap2.cpp
45
fwrap2.cpp
@ -64,6 +64,10 @@ IPQ_DLL_EXPORT int GETDUMPSTRINGON(int *id)
|
||||
{
|
||||
return GetDumpStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void GETERRORFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETERRORFILEON(int *id)
|
||||
{
|
||||
return GetErrorFileOnF(id);
|
||||
@ -76,6 +80,10 @@ IPQ_DLL_EXPORT int GETERRORSTRINGLINECOUNT(int *id)
|
||||
{
|
||||
return GetErrorStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETERRORSTRINGON(int *id)
|
||||
{
|
||||
return GetErrorStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void GETLOGFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetLogFileNameF(id, filename, len);
|
||||
@ -122,6 +130,10 @@ IPQ_DLL_EXPORT int GETSELECTEDOUTPUTCOLUMNCOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputColumnCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void GETSELECTEDOUTPUTFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETSELECTEDOUTPUTFILEON(int *id)
|
||||
{
|
||||
return GetSelectedOutputFileOnF(id);
|
||||
@ -130,6 +142,19 @@ IPQ_DLL_EXPORT int GETSELECTEDOUTPUTROWCOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputRowCountF(id);
|
||||
}
|
||||
// GetSelectedOutputString
|
||||
IPQ_DLL_EXPORT void GETSELECTEDOUTPUTSTRINGLINE(int *id, int *n, char* line, unsigned int line_length)
|
||||
{
|
||||
GetSelectedOutputStringLineF(id, n, line, line_length);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETSELECTEDOUTPUTSTRINGLINECOUNT(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETSELECTEDOUTPUTSTRINGON(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int GETSELECTEDOUTPUTVALUE(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length)
|
||||
{
|
||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||
@ -186,10 +211,18 @@ IPQ_DLL_EXPORT int SETDUMPSTRINGON(int *id, int *dump_string_on)
|
||||
{
|
||||
return SetDumpStringOnF(id, dump_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETERRORFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETERRORFILEON(int *id, int *error_on)
|
||||
{
|
||||
return SetErrorFileOnF(id, error_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETERRORSTRINGON(int *id, int *error_string_on)
|
||||
{
|
||||
return SetErrorStringOnF(id, error_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETLOGFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetLogFileNameF(id, filename, len);
|
||||
@ -214,9 +247,17 @@ IPQ_DLL_EXPORT int SETOUTPUTSTRINGON(int *id, int *output_on)
|
||||
{
|
||||
return SetOutputStringOnF(id, output_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||
IPQ_DLL_EXPORT int SETSELECTEDOUTPUTFILENAME(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetSelOutFileOnF(id, selected_on);
|
||||
return SetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETSELECTEDOUTPUTFILEON(int *id, int *selout_file_on)
|
||||
{
|
||||
return SetSelectedOutputFileOnF(id, selout_file_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int SETSELECTEDOUTPUTSTRINGON(int *id, int *selout_string_on)
|
||||
{
|
||||
return SetSelectedOutputStringOnF(id, selout_string_on);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
45
fwrap3.cpp
45
fwrap3.cpp
@ -63,6 +63,10 @@ IPQ_DLL_EXPORT int getdumpstringon_(int *id)
|
||||
{
|
||||
return GetDumpStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void geterrorfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int geterrorfileon_(int *id)
|
||||
{
|
||||
return GetErrorFileOnF(id);
|
||||
@ -76,6 +80,10 @@ IPQ_DLL_EXPORT int geterrorstringlinecount_(int *id)
|
||||
{
|
||||
return GetErrorStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int geterrorstringon_(int *id)
|
||||
{
|
||||
return GetErrorStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void getlogfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetLogFileNameF(id, filename, len);
|
||||
@ -122,6 +130,10 @@ IPQ_DLL_EXPORT int getselectedoutputcolumncount_(int *id)
|
||||
{
|
||||
return GetSelectedOutputColumnCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT void getselectedoutputfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
GetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int getselectedoutputfileon_(int *id)
|
||||
{
|
||||
return GetSelectedOutputFileOnF(id);
|
||||
@ -130,6 +142,19 @@ IPQ_DLL_EXPORT int getselectedoutputrowcount_(int *id)
|
||||
{
|
||||
return GetSelectedOutputRowCountF(id);
|
||||
}
|
||||
// GetSelectedOutputString
|
||||
IPQ_DLL_EXPORT void getselectedoutputstringline_(int *id, int *n, char* line, unsigned int line_length)
|
||||
{
|
||||
GetSelectedOutputStringLineF(id, n, line, line_length);
|
||||
}
|
||||
IPQ_DLL_EXPORT int getselectedoutputstringlinecount_(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringLineCountF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int getselectedoutputstringon_(int *id)
|
||||
{
|
||||
return GetSelectedOutputStringOnF(id);
|
||||
}
|
||||
IPQ_DLL_EXPORT int getselectedoutputvalue_(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, unsigned int svalue_length)
|
||||
{
|
||||
return GetSelectedOutputValueF(id, row, col, vtype, dvalue, svalue, svalue_length);
|
||||
@ -187,10 +212,18 @@ IPQ_DLL_EXPORT int setdumpstringon_(int *id, int *dump_string_on)
|
||||
{
|
||||
return SetDumpStringOnF(id, dump_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int seterrorfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetErrorFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int seterrorfileon_(int *id, int *error_on)
|
||||
{
|
||||
return SetErrorFileOnF(id, error_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int seterrorstringon_(int *id, int *error_string_on)
|
||||
{
|
||||
return SetErrorStringOnF(id, error_string_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int setlogfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetLogFileNameF(id, filename, len);
|
||||
@ -215,9 +248,17 @@ IPQ_DLL_EXPORT int setoutputstringon_(int *id, int *output_on)
|
||||
{
|
||||
return SetOutputStringOnF(id, output_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int setselectedoutputfileon_(int *id, int *selected_on)
|
||||
IPQ_DLL_EXPORT int setselectedoutputfilename_(int *id, char *filename, unsigned int len)
|
||||
{
|
||||
return SetSelOutFileOnF(id, selected_on);
|
||||
return SetSelectedOutputFileNameF(id, filename, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int setselectedoutputfileon_(int *id, int *selout_file_on)
|
||||
{
|
||||
return SetSelectedOutputFileOnF(id, selout_file_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int setselectedoutputstringon_(int *id, int *selout_string_on)
|
||||
{
|
||||
return SetSelectedOutputStringOnF(id, selout_string_on);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user