Object-oriented Scientific Computing Library: Version 0.910
lib_settings.h
Go to the documentation of this file.
00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006-2012, 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 /** \brief The main \o2 namespace
00033     
00034     By default, all \o2 classes and functions which are not listed as
00035     being in one of \o2's smaller specialized namespaces are in this
00036     namespace. This namespace has been removed from the documentation
00037     to simplify the formatting.
00038 
00039     \htmlonly
00040     For a full list of all the 
00041     O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl 
00042     classes, see
00043     <a href="annotated.html">Data Structures</a>.
00044 
00045     For a full list of all the
00046     O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl 
00047     global objects which are not
00048     classes, see <a href="globals.html">Files::Globals</a>.
00049     
00050     \endhtmlonly
00051     
00052     This namespace documentation is in the file 
00053     <tt>src/base/lib_settings.h</tt>
00054 */
00055 namespace o2scl {
00056 }
00057 
00058 /** \brief The namespace for linear algebra classes and functions
00059 
00060     This namespace documentation is in the file 
00061     <tt>src/base/lib_settings.h</tt>
00062 
00063     \future Move this documentation to the linalg directory.
00064 */
00065 namespace o2scl_linalg {
00066 }
00067 
00068 /** \brief The namespace for linear algebra classes and functions 
00069     with operator()
00070 
00071     This namespace contains an identical copy of all the functions given 
00072     in the \ref o2scl_cblas namespace, but perform array indexing
00073     with \c operator() rather than \c operator[]. See \ref o2scl_linalg
00074     for the function listing and documentation.
00075 
00076     This namespace documentation is in the file 
00077     <tt>src/base/lib_settings.h</tt>
00078 */
00079 namespace o2scl_linalg_paren {
00080 }
00081 
00082 #ifndef DOXYGENP
00083 namespace o2scl {
00084 #endif
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 true if the EOS library was installed
00122     bool eos_installed();
00123 
00124     /// Return true if the particle library was installed
00125     bool part_installed();
00126 
00127     /// Return true if \o2 was installed with HDF support
00128     bool hdf_support();
00129 
00130     /** \brief Return true if range checking was turned on during 
00131         installation (default true)
00132     */
00133     bool range_check();
00134 
00135     /// Return the library version
00136     std::string o2scl_version();
00137 
00138   protected:
00139 
00140 #ifndef DOXYGEN_INTERNAL
00141 
00142     /// The present data directory
00143     std::string data_dir;
00144     /// The present temp file directory
00145     std::string tmp_dir;
00146 
00147 #endif
00148   
00149   };
00150 
00151   /** \brief The global library settings object
00152 
00153       This global object is used by \ref polylog and some of the \o2e
00154       classes to find data files. It may also be used by the end-user
00155       to probe details of the \o2 installation.
00156    */
00157   extern lib_settings_class lib_settings;
00158 
00159 #ifndef DOXYGENP
00160 }
00161 #endif
00162 
00163 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.