Stride Reference Manual  1.0
InstallDirs.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2017, Willem L, Kuylen E, Stijven S & Broeckhove J
15  */
16 
22 #include <boost/filesystem.hpp>
23 
24 namespace stride {
25 namespace util {
26 
30 class InstallDirs {
31 public:
33  static boost::filesystem::path getBinDir();
34 
36  static boost::filesystem::path getCurrentDir();
37 
39  static boost::filesystem::path getDataDir();
40 
42  static boost::filesystem::path getExecPath();
43 
45  static boost::filesystem::path getRootDir();
46 
48  static boost::filesystem::path getOutputDir();
49 
50 private:
52  static void check();
53 
55  static void initialize();
56 
57 private:
58  static boost::filesystem::path g_bin_dir;
59  static boost::filesystem::path g_current_dir;
60  static boost::filesystem::path g_data_dir;
61  static boost::filesystem::path g_exec_path;
62  static boost::filesystem::path g_root_dir;
63  static boost::filesystem::path g_output_dir;
64 };
65 
66 }
67 }
68 
static boost::filesystem::path g_root_dir
Definition: InstallDirs.h:62
static boost::filesystem::path getOutputDir()
Utility method: get the path to the output directory.
static boost::filesystem::path g_data_dir
Definition: InstallDirs.h:60
Time Dependent Person DataType.
Definition: NoBehaviour.h:17
static boost::filesystem::path getDataDir()
Utility method: get path to the directory for data files.
static boost::filesystem::path getExecPath()
Utility method: get name of executable.
static boost::filesystem::path getCurrentDir()
Utility method: get path to the current directory.
Install directories.
Definition: InstallDirs.h:30
static boost::filesystem::path g_current_dir
Definition: InstallDirs.h:59
static boost::filesystem::path getBinDir()
Utility method: get path to bin directory.
static boost::filesystem::path g_bin_dir
Definition: InstallDirs.h:58
static void initialize()
Initialize all paths.
Definition: InstallDirs.cpp:57
static boost::filesystem::path g_output_dir
Definition: InstallDirs.h:63
static boost::filesystem::path getRootDir()
Utility method: get application installation root directory.
static boost::filesystem::path g_exec_path
Definition: InstallDirs.h:61
static void check()
Check initialization.
Definition: InstallDirs.cpp:49