lib_settings.h

Go to the documentation of this file.
00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006, 2007, Andrew W. Steiner
00005   
00006   This file is part of O2scl.
00007   
00008   O2scl is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation; either version 3 of the License, or
00011   (at your option) any later version.
00012   
00013   O2scl is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017   
00018   You should have received a copy of the GNU General Public License
00019   along with O2scl. If not, see <http://www.gnu.org/licenses/>.
00020 
00021   -------------------------------------------------------------------
00022 */
00023 #ifndef O2SCL_LIB_SETTINGS_H
00024 #define O2SCL_LIB_SETTINGS_H
00025 #include <iostream>
00026 #include <string>
00027 
00028 /** \file lib_settings.h
00029     \brief File for definitions for lib_settings_class
00030 */
00031 
00032 #ifndef DOXYGENP
00033 namespace o2scl {
00034 #endif
00035 
00036   /** \brief A class to manage testing and record success and failure
00037 
00038   */
00039   class lib_settings_class {
00040 
00041   public:
00042 
00043     lib_settings_class();
00044 
00045     ~lib_settings_class();
00046 
00047     /** \brief Return the data directory */
00048     std::string get_data_dir() {
00049       return data_dir;
00050     }
00051 
00052     /** \brief Set the data directory */
00053     int set_data_dir(std::string dir) {
00054       data_dir=dir;
00055       return 0;
00056     }
00057     
00058     /** \brief Return the temp file directory */
00059     std::string get_tmp_dir() {
00060       return tmp_dir;
00061     }
00062 
00063     /** \brief Set the temp file directory */
00064     int set_tmp_dir(std::string dir) {
00065       tmp_dir=dir;
00066       return 0;
00067     }
00068 
00069     /** 
00070         \brief Return true if range checking was turned on during installation
00071      */
00072     bool range_check();
00073 
00074     /// Return the library version
00075     std::string o2scl_version();
00076 
00077   protected:
00078 
00079 #ifndef DOXYGEN_INTERNAL
00080 
00081     /// The present data directory
00082     std::string data_dir;
00083     /// The present temp file directory
00084     std::string tmp_dir;
00085 
00086 #endif
00087   
00088   };
00089 
00090   /// The global library settings object
00091   extern lib_settings_class lib_settings;
00092 
00093 #ifndef DOXYGENP
00094 }
00095 #endif
00096 
00097 #endif

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page