00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 2009, 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 \endhtmlonly 00052 */ 00053 namespace o2scl { 00054 } 00055 00056 #ifndef DOXYGENP 00057 namespace o2scl { 00058 #endif 00059 00060 /** 00061 \brief A class to manage global library settings 00062 00063 A global object of this type is defined in 00064 <tt>lib_settings.h</tt> named \ref lib_settings . 00065 */ 00066 class lib_settings_class { 00067 00068 public: 00069 00070 lib_settings_class(); 00071 00072 ~lib_settings_class(); 00073 00074 /** \brief Return the data directory */ 00075 std::string get_data_dir() { 00076 return data_dir; 00077 } 00078 00079 /** \brief Set the data directory */ 00080 int set_data_dir(std::string dir) { 00081 data_dir=dir; 00082 return 0; 00083 } 00084 00085 /** \brief Return the temp file directory */ 00086 std::string get_tmp_dir() { 00087 return tmp_dir; 00088 } 00089 00090 /** \brief Set the temp file directory */ 00091 int set_tmp_dir(std::string dir) { 00092 tmp_dir=dir; 00093 return 0; 00094 } 00095 00096 /** 00097 \brief Return true if range checking was turned on during 00098 installation (default true) 00099 */ 00100 bool range_check(); 00101 00102 /// Return the library version 00103 std::string o2scl_version(); 00104 00105 protected: 00106 00107 #ifndef DOXYGEN_INTERNAL 00108 00109 /// The present data directory 00110 std::string data_dir; 00111 /// The present temp file directory 00112 std::string tmp_dir; 00113 00114 #endif 00115 00116 }; 00117 00118 /** 00119 \brief The global library settings object 00120 00121 This global object is used by \ref polylog and some of the \o2e 00122 classes to find data files. It may also be used by the end-user 00123 to probe details of the \o2 installation. 00124 */ 00125 extern lib_settings_class lib_settings; 00126 00127 #ifndef DOXYGENP 00128 } 00129 #endif 00130 00131 #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