00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 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 /** 00033 \brief The main \o2 namespace 00034 00035 By default, all \o2 classes and functions which are not listed as 00036 being in one of \o2's smaller specialized namespaces are in this 00037 namespace. This namespace has been removed from the 00038 documentation to simplify the formatting. 00039 00040 \htmlonly 00041 For a full list of all the 00042 O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl 00043 classes, see 00044 <a href="annotated.html">Data Structures</a>. 00045 00046 For a full list of all the 00047 O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl 00048 global objects which are not 00049 classes, see <a href="globals.html">Files::Globals</a>. 00050 00051 00052 \endhtmlonly 00053 */ 00054 namespace o2scl { 00055 } 00056 00057 #ifndef DOXYGENP 00058 namespace o2scl { 00059 #endif 00060 00061 /** 00062 \brief A class to manage global library settings 00063 */ 00064 class lib_settings_class { 00065 00066 public: 00067 00068 lib_settings_class(); 00069 00070 ~lib_settings_class(); 00071 00072 /** \brief Return the data directory */ 00073 std::string get_data_dir() { 00074 return data_dir; 00075 } 00076 00077 /** \brief Set the data directory */ 00078 int set_data_dir(std::string dir) { 00079 data_dir=dir; 00080 return 0; 00081 } 00082 00083 /** \brief Return the temp file directory */ 00084 std::string get_tmp_dir() { 00085 return tmp_dir; 00086 } 00087 00088 /** \brief Set the temp file directory */ 00089 int set_tmp_dir(std::string dir) { 00090 tmp_dir=dir; 00091 return 0; 00092 } 00093 00094 /** 00095 \brief Return true if range checking was turned on during installation 00096 */ 00097 bool range_check(); 00098 00099 /// Return the library version 00100 std::string o2scl_version(); 00101 00102 protected: 00103 00104 #ifndef DOXYGEN_INTERNAL 00105 00106 /// The present data directory 00107 std::string data_dir; 00108 /// The present temp file directory 00109 std::string tmp_dir; 00110 00111 #endif 00112 00113 }; 00114 00115 /// The global library settings object 00116 extern lib_settings_class lib_settings; 00117 00118 #ifndef DOXYGENP 00119 } 00120 #endif 00121 00122 #endif
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page