Class lib_settings_class (o2scl)

O2scl : Class List

class lib_settings_class

A class to manage global library settings.

This class reports global settings such as the current version, whether or not sub-libraries were installed and what the current parent directory for data files is.

A global object of this type is defined in lib_settings.h named o2scl_settings .

This class should not typically be instantiated by the end-user.

Unit conversion objects

convert_units<double> def_cu

Default convert_units object.

unsigned int seed

Seed for thread-safe random number generation rng_set_seed()

bool py_initialized

True if Python has been initialized (default false)

inline convert_units<double> &get_convert_units()

Get the global convert_units object.

int py_init_nothrow(int verbose = 0)

Initialize the python interface.

This function uses the environment variable O2SCL_PYTHON_EXT to set the Python name via the function Py_SetProgramName() before the function Py_Initialize() is called.

void py_init(int verbose = 0)

Initialize the python interface.

This function uses the environment variable O2SCL_PYTHON_EXT to set the Python name via the function Py_SetProgramName() before the function Py_Initialize() is called.

int py_final_nothrow(int verbose = 0)

Finalize the python interface.

void py_final(int verbose = 0)

Finalize the python interface.

std::string py_version()

String containing python version.

void *py_import_array()

Import arrays for numpy C api.

std::string py_get_module_path(std::string module)

Get the path for the Python module named module.

void add_python_path(std::string path, int verbose = 0)

Add path path to the python system search path.

void get_python_path(std::vector<std::string> &vs, int verbose = 0)

Get the python path and place the path strings in vs.

PyObject *py_import_module(std::string module, int verbose = 0)

Import module named module.

This function outputs some debugging information if the module import fails. The function py_init() must be called first.

Internal data set in the constructor [protected]

std::string data_dir

The present data directory.

std::string doc_dir

The present documentation directory.

convert_units<double> *cup

Pointer to current convert_units object.

find_constants *fcp

Pointer to current find_constants object.

Library settings

inline std::string get_data_dir()

Return the data directory.

inline int set_data_dir(std::string dir)

Set the data directory.

inline std::string get_doc_dir()

Return the doc directory.

inline int set_doc_dir(std::string dir)

Set the doc directory.

bool openmp_support()

Return true if was installed with OpenMP support.

bool readline_support()

Return true if was installed with readline support.

bool module_support()

Return true if was installed with module support.

bool mpfr_support()

Return true if was installed with mpfr support.

bool ncurses_support()

Return true if was installed with ncurses support.

bool armadillo_support()

Return true if was installed with Armadillo support.

bool eigen_support()

Return true if was installed with Eigen support.

bool fftw_support()

Return true if was installed with FFTW support.

bool cubature_support()

Return true if was installed with CUBATURE support.

bool python_support()
bool hdf5_compression_support()

Return true if was installed with HDF5 compression support.

std::string system_type()

Return system type determined by autoconf.

Returns either “OSX”, “Linux” or “unknown”.

bool range_check()

Return true if range checking was turned on during installation (default true)

std::string time_compiled()

Return the time was compiled.

std::string date_compiled()

Return the date was compiled.

std::string o2scl_version()

Return the library version.

void config_h_report()

Report some of the settings from config.h.

void hdf5_lib_version(unsigned &maj, unsigned &min, unsigned &rel)

Obtain HDF5 version from the library compiled with O2scl.

void hdf5_header_version(unsigned &maj, unsigned &min, unsigned &rel)

Obtain HDF5 version from the current headers.

Miscellaneous config.h string properties

std::string o2scl_name()
std::string o2scl_package()
std::string o2scl_bugreport()
std::string o2scl_string()
std::string o2scl_tarname()

Public Functions

lib_settings_class()
~lib_settings_class()