mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
removed UnLoadDatabase from public API
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4449 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
770fea9d2f
commit
bc0669e732
@ -183,10 +183,6 @@
|
||||
<param name="Name" value="SetSelectedOutputFileOn">
|
||||
<param name="Local" value="html\IPhreeqc_8h.html#aab495f8b0729402876405d1be19ecded">
|
||||
</OBJECT>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="UnLoadDatabase">
|
||||
<param name="Local" value="html\IPhreeqc_8h.html#ab972eca345175f5703918c05737e725a">
|
||||
</OBJECT>
|
||||
</UL>
|
||||
<LI> <OBJECT type="text/sitemap">
|
||||
<param name="Name" value="C/C++ VAR Reference">
|
||||
|
||||
@ -77,4 +77,3 @@ C
|
||||
INTEGER(KIND=4) SetLogFileOn
|
||||
INTEGER(KIND=4) SetOutputFileOn
|
||||
INTEGER(KIND=4) SetSelectedOutputFileOn
|
||||
INTEGER(KIND=4) UnLoadDatabase
|
||||
|
||||
@ -319,6 +319,3 @@
|
||||
INTEGER(KIND=4) :: SetSelectedOutputFileOn
|
||||
END FUNCTION SetSelectedOutputFileOn
|
||||
END INTERFACE
|
||||
|
||||
|
||||
!!! TODO UnLoadDatabase
|
||||
|
||||
@ -111,7 +111,7 @@ extern "C" {
|
||||
/**
|
||||
* Create a new IPhreeqc instance.
|
||||
* @return A non-negative value if successful; otherwise a negative value indicates an error occured (see \ref IPQ_RESULT).
|
||||
* @see DestroyIPhreeqc, UnLoadDatabase
|
||||
* @see DestroyIPhreeqc
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
@ -139,7 +139,7 @@ extern "C" {
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @retval IPQ_OK Success
|
||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||
* @see CreateIPhreeqc, UnLoadDatabase
|
||||
* @see CreateIPhreeqc
|
||||
* @par Fortran90 Interface:
|
||||
* @htmlonly
|
||||
* <CODE>
|
||||
@ -744,7 +744,7 @@ Headings
|
||||
* The full path (or relative path with respect to the working directory)
|
||||
* must be given if the file is not in the current working directory.
|
||||
* @return The number of errors encountered.
|
||||
* @see LoadDatabaseString, UnLoadDatabase
|
||||
* @see LoadDatabaseString
|
||||
* @remarks
|
||||
* All previous definitions are cleared.
|
||||
* @par Fortran90 Interface:
|
||||
@ -774,7 +774,7 @@ Headings
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @param input String containing data to be used as the phreeqc database.
|
||||
* @return The number of errors encountered.
|
||||
* @see LoadDatabase, UnLoadDatabase
|
||||
* @see LoadDatabase
|
||||
* @remarks
|
||||
* All previous definitions are cleared.
|
||||
* @par Fortran90 Interface:
|
||||
@ -1093,21 +1093,6 @@ Headings
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetSelectedOutputFileOn(int id, int sel_on);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Unloads the database currently loaded into phreeqc. In addition, all
|
||||
* previous phreeqc definitions (i.e. SOLUTION, EXCHANGE, etc) are cleared from memory.
|
||||
* @param id The instance id returned from \ref CreateIPhreeqc.
|
||||
* @retval IPQ_OK Success.
|
||||
* @retval IPQ_BADINSTANCE The given id is invalid.
|
||||
* @see DestroyIPhreeqc, LoadDatabase, LoadDatabaseString
|
||||
* @remarks
|
||||
* Use of the method is not normally necessary. It is called automatically
|
||||
* before each call to \ref LoadDatabase or \ref LoadDatabaseString.
|
||||
*/
|
||||
IPQ_DLL_EXPORT IPQ_RESULT UnLoadDatabase(int id);
|
||||
|
||||
|
||||
// TODO int RunWithCallback(PFN_PRERUN_CALLBACK pfn_pre, PFN_POSTRUN_CALLBACK pfn_post, void *cookie, int output_on, int error_on, int log_on, int selected_output_on);
|
||||
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ public:
|
||||
* The full path (or relative path with respect to the working directory) will be required if the file is not
|
||||
* in the current working directory.
|
||||
* @return The number of errors encountered.
|
||||
* @see LoadDatabaseString, UnLoadDatabase
|
||||
* @see LoadDatabaseString
|
||||
* @remarks
|
||||
* All previous definitions are cleared.
|
||||
*/
|
||||
@ -426,7 +426,7 @@ public:
|
||||
* Load the specified string as a database into phreeqc.
|
||||
* @param input String containing data to be used as the phreeqc database.
|
||||
* @return The number of errors encountered.
|
||||
* @see LoadDatabaseString, UnLoadDatabase
|
||||
* @see LoadDatabaseString
|
||||
* @remarks
|
||||
* All previous definitions are cleared.
|
||||
*/
|
||||
@ -534,16 +534,6 @@ public:
|
||||
*/
|
||||
void SetSelectedOutputFileOn(bool bValue);
|
||||
|
||||
/**
|
||||
* Unloads the database currently loaded into phreeqc. In addition, all
|
||||
* previous phreeqc definitions (i.e. SOLUTION, EXCHANGE, etc) are cleared from memory.
|
||||
* @see LoadDatabase, LoadDatabaseString
|
||||
* @remarks
|
||||
* Use of the method is not normally necessary. It is called automatically
|
||||
* before each call to \ref LoadDatabase or \ref LoadDatabaseString.
|
||||
*/
|
||||
void UnLoadDatabase(void);
|
||||
|
||||
protected:
|
||||
static int handler(const int action, const int type, const char *err_str, const int stop, void *cookie, const char *format, va_list args);
|
||||
int output_handler(const int type, const char *err_str, const int stop, void *cookie, const char *format, va_list args);
|
||||
@ -557,6 +547,7 @@ protected:
|
||||
|
||||
int EndRow(void);
|
||||
void AddSelectedOutput(const char* name, const char* format, va_list argptr);
|
||||
void UnLoadDatabase(void);
|
||||
|
||||
void check_database(const char* sz_routine);
|
||||
void open_output_files(const char* sz_routine);
|
||||
|
||||
@ -344,11 +344,3 @@
|
||||
INTEGER(KIND=4) :: SetSelOutFileOnF
|
||||
SetSelectedOutputFileOn = SetSelOutFileOnF(ID,SELECTED_ON)
|
||||
END FUNCTION SetSelectedOutputFileOn
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION UnLoadDatabase(ID)
|
||||
IMPLICIT NONE
|
||||
INTEGER(KIND=4) :: ID
|
||||
INTEGER(KIND=4) :: UnLoadDatabase
|
||||
INTEGER(KIND=4) :: UnLoadDatabaseF
|
||||
UnLoadDatabase = UnLoadDatabaseF(ID)
|
||||
END FUNCTION UnLoadDatabase
|
||||
|
||||
@ -543,18 +543,6 @@ SetSelectedOutputFileOn(int id, int value)
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
UnLoadDatabase(int id)
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
IPhreeqcPtr->UnLoadDatabase();
|
||||
return IPQ_OK;
|
||||
}
|
||||
return IPQ_BADINSTANCE;
|
||||
}
|
||||
|
||||
// helper functions
|
||||
//
|
||||
|
||||
|
||||
@ -391,13 +391,6 @@ SetSelOutFileOnF(int *id, int* sel_on)
|
||||
return ::SetSelectedOutputFileOn(*id, *sel_on);
|
||||
}
|
||||
|
||||
int
|
||||
UnLoadDatabaseF(int *id)
|
||||
{
|
||||
return ::UnLoadDatabase(*id);
|
||||
}
|
||||
|
||||
|
||||
#if defined(_WIN32) && !defined(_M_AMD64)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -558,10 +551,6 @@ IPQ_DLL_EXPORT void __stdcall SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||
{
|
||||
SetSelOutFileOnF(id, selected_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int __stdcall UNLOADDATABASE(int *id)
|
||||
{
|
||||
return UnLoadDatabaseF(id);
|
||||
}
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -45,7 +45,6 @@
|
||||
#define SetLogFileOnF FC_FUNC (setlogfileonf, SETLOGFILEONF)
|
||||
#define SetOutputFileOnF FC_FUNC (setoutputfileonf, SETOUTPUTFILEONF)
|
||||
#define SetSelOutFileOnF FC_FUNC (setseloutfileonf, SETSELOUTFILEONF)
|
||||
#define UnLoadDatabaseF FC_FUNC (unloaddatabasef, UNLOADDATABASEF)
|
||||
#endif /* FC_FUNC */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@ -89,7 +88,6 @@ extern "C" {
|
||||
IPQ_RESULT SetLogFileOnF(int *id, int* log_on);
|
||||
IPQ_RESULT SetOutputFileOnF(int *id, int* output_on);
|
||||
IPQ_RESULT SetSelOutFileOnF(int *id, int* selected_output_on);
|
||||
int UnLoadDatabaseF(int *id);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@ -160,10 +160,6 @@ IPQ_DLL_EXPORT void SETSELECTEDOUTPUTFILEON(int *id, int *selected_on)
|
||||
{
|
||||
SetSelOutFileOnF(id, selected_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int UNLOADDATABASE(int *id)
|
||||
{
|
||||
return UnLoadDatabaseF(id);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@ -161,10 +161,6 @@ IPQ_DLL_EXPORT void setselectedoutputfileon_(int *id, int *selected_on)
|
||||
{
|
||||
SetSelOutFileOnF(id, selected_on);
|
||||
}
|
||||
IPQ_DLL_EXPORT int unloaddatabase_(int *id)
|
||||
{
|
||||
return UnLoadDatabaseF(id);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@ -1248,7 +1248,6 @@ void TestIPhreeqcLib::TestRunNoDatabaseLoaded(void)
|
||||
int n = ::CreateIPhreeqc();
|
||||
CPPUNIT_ASSERT(n >= 0);
|
||||
|
||||
::UnLoadDatabase(n);
|
||||
CPPUNIT_ASSERT_EQUAL( 1, ::RunAccumulated(n) );
|
||||
|
||||
const char expected[] =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user