fw4spl
fwPreferences/include/fwPreferences/helper.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2014-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwPreferences/config.hpp"
10 #include "fwPreferences/IPreferences.hpp"
11 
12 #include <fwData/Composite.hpp>
13 
14 #include <boost/filesystem.hpp>
15 
16 #include <string>
17 
18 namespace fwPreferences
19 {
20 
21 FWPREFERENCES_API extern const std::string s_PREFERENCES_KEY;
22 
24 FWPREFERENCES_API std::string getPreference(const std::string& preferenceKey);
25 
27 FWPREFERENCES_API bool setPreference(const std::string& key, const std::string& value);
28 
30 FWPREFERENCES_API ::boost::filesystem::path getPreferencesFile();
31 
33 FWPREFERENCES_API ::fwData::Composite::sptr getPreferences();
34 
40 FWPREFERENCES_API void savePreferences();
41 
42 } // namespace fwPreferences