Falaise  4.0.1
SuperNEMO Software Toolkit
Classes | Namespaces | Functions
resource.h File Reference

Utilities for accessing falaise resource/plugin files. More...

#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

class  falaise::ResourceInitializationException
 Exception class for bad resource initialization. More...
 
class  falaise::UnknownResourceException
 Exception class for unknown resources. More...
 

Namespaces

 falaise
 

Functions

void falaise::init_resources ()
 
std::string falaise::get_resource_dir ()
 Return URL, i.e. a path, to the base directory where resource files are installed. More...
 
std::string falaise::get_resource (const std::string &rname)
 Return URL, i.e. a path, to named resource. More...
 
std::string falaise::get_plugin_dir ()
 //! Return URL, i.e. a path, to the base directory where plugin DLL files are installed More...
 
std::string falaise::get_plugin (const std::string &rname)
 Return URL, i.e. a path, to named resource. More...
 

Detailed Description

Utilities for accessing falaise resource/plugin files.

The falaise library makes use of several resource files containing isotopic and radioactive decays data. Falaise also implements a plugin architecture, with several supplied as core functionality.

As these files are not compiled into the falaise library, a simple API is provided to return the root paths to core resource and plugin directories.

These paths are calculated based on the location of the Falaise library, allowing relocation of the Falaise package after installation.

If your application uses resources from Falaise, you must call the falaise::init_resources function before trying to access resources.