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 documentation 00038 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 This namespace documentation is in the file 00054 <tt>src/base/lib_settings.h</tt> 00055 */ 00056 namespace o2scl { 00057 } 00058 00059 /** \brief The namespace for linear algebra classes and functions 00060 00061 This namespace documentation is in the file 00062 <tt>src/base/lib_settings.h</tt> 00063 */ 00064 namespace o2scl_linalg { 00065 } 00066 00067 /** \brief The namespace for linear algebra classes and functions 00068 with operator() 00069 00070 This namespace contains an identical copy of all the functions given 00071 in the \ref o2scl_cblas namespace, but perform array indexing 00072 with \c operator() rather than \c operator[]. See \ref o2scl_linalg 00073 for the function listing and documentation. 00074 00075 This namespace documentation is in the file 00076 <tt>src/base/lib_settings.h</tt> 00077 */ 00078 namespace o2scl_linalg_paren { 00079 } 00080 00081 #ifndef DOXYGENP 00082 namespace o2scl { 00083 #endif 00084 00085 /** 00086 \brief A class to manage global library settings 00087 00088 A global object of this type is defined in 00089 <tt>lib_settings.h</tt> named \ref lib_settings . 00090 */ 00091 class lib_settings_class { 00092 00093 public: 00094 00095 lib_settings_class(); 00096 00097 ~lib_settings_class(); 00098 00099 /** \brief Return the data directory */ 00100 std::string get_data_dir() { 00101 return data_dir; 00102 } 00103 00104 /** \brief Set the data directory */ 00105 int set_data_dir(std::string dir) { 00106 data_dir=dir; 00107 return 0; 00108 } 00109 00110 /** \brief Return the temp file directory */ 00111 std::string get_tmp_dir() { 00112 return tmp_dir; 00113 } 00114 00115 /** \brief Set the temp file directory */ 00116 int set_tmp_dir(std::string dir) { 00117 tmp_dir=dir; 00118 return 0; 00119 } 00120 00121 /// Return 1 if the EOS library was installed 00122 int eos_installed(); 00123 00124 /// Return 1 if the particle library was installed 00125 int part_installed(); 00126 00127 /** 00128 \brief Return true if range checking was turned on during 00129 installation (default true) 00130 */ 00131 bool range_check(); 00132 00133 /// Return the library version 00134 std::string o2scl_version(); 00135 00136 protected: 00137 00138 #ifndef DOXYGEN_INTERNAL 00139 00140 /// The present data directory 00141 std::string data_dir; 00142 /// The present temp file directory 00143 std::string tmp_dir; 00144 00145 #endif 00146 00147 }; 00148 00149 /** 00150 \brief The global library settings object 00151 00152 This global object is used by \ref polylog and some of the \o2e 00153 classes to find data files. It may also be used by the end-user 00154 to probe details of the \o2 installation. 00155 */ 00156 extern lib_settings_class lib_settings; 00157 00158 #ifndef DOXYGENP 00159 } 00160 #endif 00161 00162 #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