Removed unused tmpDir and sleep functions
This commit is contained in:
parent
3be53356a2
commit
0045bc0a71
5 changed files with 0 additions and 110 deletions
|
|
@ -210,37 +210,6 @@ void thread_complete() ;
|
|||
*/
|
||||
std::string canteraRoot();
|
||||
|
||||
//! Sets the temporary file directory.
|
||||
/*!
|
||||
* The default is to use the
|
||||
* directory specified by environment variable TMP or TEMP. If neither
|
||||
* of these are defined, then the current working directory will be
|
||||
* used for temporary files. Call this function to specify some other
|
||||
* place to put temporary files.
|
||||
*
|
||||
* @ingroup inputfiles
|
||||
*
|
||||
* @param tmp String name for the temporary directory
|
||||
*/
|
||||
void setTmpDir(std::string tmp);
|
||||
|
||||
//! Retrieves the directory name where temporary files are created
|
||||
/*!
|
||||
* @ingroup inputfiles
|
||||
* @return
|
||||
* Returns a string containing the directory name
|
||||
*/
|
||||
std::string tmpDir();
|
||||
|
||||
//! Delay time in seconds.
|
||||
/*!
|
||||
* @return
|
||||
* Returns the length of time in seconds for calls to the
|
||||
* sleep function.
|
||||
* @ingroup inputfiles
|
||||
*/
|
||||
std::string sleep();
|
||||
|
||||
/*!
|
||||
* @defgroup logs Diagnostic Output
|
||||
*
|
||||
|
|
|
|||
|
|
@ -376,33 +376,11 @@ Application::Application() :
|
|||
inputDirs(0),
|
||||
stop_on_error(false),
|
||||
options(),
|
||||
tmp_dir("."),
|
||||
xmlfiles(),
|
||||
m_sleep("1"),
|
||||
pMessenger() {
|
||||
#if !defined( THREAD_SAFE_CANTERA )
|
||||
pMessenger = std::auto_ptr<Messages>(new Messages());
|
||||
#endif
|
||||
// if TMP or TEMP is set, use it for the temporary
|
||||
// directory
|
||||
char* ctmpdir = getenv("CANTERA_TMPDIR");
|
||||
if (ctmpdir != 0) {
|
||||
tmp_dir = std::string(ctmpdir);
|
||||
} else {
|
||||
char* tmpdir = getenv("TMP");
|
||||
if (tmpdir == 0) {
|
||||
tmpdir = getenv("TEMP");
|
||||
}
|
||||
if (tmpdir != 0) {
|
||||
tmp_dir = std::string(tmpdir);
|
||||
}
|
||||
}
|
||||
|
||||
// if SLEEP is set, use it as the sleep time
|
||||
char* sleepstr = getenv("SLEEP");
|
||||
if (sleepstr != 0) {
|
||||
m_sleep = std::string(sleepstr);
|
||||
}
|
||||
|
||||
// install a default logwriter that writes to standard
|
||||
// output / standard error
|
||||
|
|
@ -590,24 +568,6 @@ long int Application::readStringRegistryKey(const std::string& keyName, const st
|
|||
}
|
||||
#endif
|
||||
|
||||
void Application::setTmpDir(std::string tmp)
|
||||
{
|
||||
APP_LOCK();
|
||||
tmp_dir = tmp ;
|
||||
}
|
||||
|
||||
std::string Application::getTmpDir()
|
||||
{
|
||||
APP_LOCK();
|
||||
return tmp_dir ;
|
||||
}
|
||||
|
||||
std::string Application::sleep()
|
||||
{
|
||||
APP_LOCK();
|
||||
return m_sleep ;
|
||||
}
|
||||
|
||||
void Application::Messages::popError()
|
||||
{
|
||||
if (static_cast<int>(errorMessage.size()) > 0) {
|
||||
|
|
|
|||
|
|
@ -376,21 +376,6 @@ public:
|
|||
//! Static function that destroys the application class's data
|
||||
static void ApplicationDestroy();
|
||||
|
||||
//! Set the directory where temporary files may be written.
|
||||
/*!
|
||||
* @param tmp Name of the directory
|
||||
*/
|
||||
void setTmpDir(std::string tmp) ;
|
||||
|
||||
//! get the name of a directory where temporary files may be written.
|
||||
std::string getTmpDir() ;
|
||||
|
||||
//! Pause the application for a certain amount
|
||||
/*!
|
||||
* This has been needed in the past for some network file systems.
|
||||
*/
|
||||
std::string sleep() ;
|
||||
|
||||
//! Set an error condition in the application class without
|
||||
//! throwing an exception.
|
||||
/*!
|
||||
|
|
@ -756,8 +741,6 @@ protected:
|
|||
std::string tmp_dir;
|
||||
//! Current vector of xml file trees that have been previously parsed
|
||||
std::map<std::string, XML_Node*> xmlfiles;
|
||||
//! Current sleep command.
|
||||
std::string m_sleep;
|
||||
//! Current pointer to the logwriter
|
||||
//Logger* logwriter;
|
||||
#ifdef WITH_HTML_LOGS
|
||||
|
|
|
|||
|
|
@ -18,13 +18,6 @@
|
|||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
// These defines are needed for the windows Sleep() function
|
||||
// - comment them out if you don't want the Sleep function.
|
||||
//#ifdef _WIN32
|
||||
//#include "Windows.h"
|
||||
//#include "Winbase.h"
|
||||
//#endif
|
||||
|
||||
using namespace Cantera;
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -146,21 +146,6 @@ void close_XML_File(std::string file)
|
|||
app()->close_XML_File(file) ;
|
||||
}
|
||||
|
||||
void setTmpDir(std::string tmp)
|
||||
{
|
||||
app()->setTmpDir(tmp);
|
||||
}
|
||||
|
||||
string tmpDir()
|
||||
{
|
||||
return app()->getTmpDir();
|
||||
}
|
||||
|
||||
string sleep()
|
||||
{
|
||||
return app()->sleep();
|
||||
}
|
||||
|
||||
int nErrors()
|
||||
{
|
||||
return app()->getErrorCount();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue