fw4spl
SPreferences.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 "preferences/config.hpp"
10 
11 #include <fwPreferences/IPreferences.hpp>
12 
13 #include <boost/filesystem/path.hpp>
14 
15 namespace preferences
16 {
17 
34 class PREFERENCES_CLASS_API SPreferences : public ::fwPreferences::IPreferences
35 {
36 
37 public:
39 
41 
42  SPreferences() noexcept
43  {
44  }
45  virtual ~SPreferences() noexcept
46  {
47  }
48 
49 protected:
50 
52  PREFERENCES_API virtual void starting() override;
53 
55  PREFERENCES_API virtual void stopping() override;
56 
58  PREFERENCES_API virtual void updating() override;
59 
60  PREFERENCES_API virtual void configuring() override;
61 
63  ::boost::filesystem::path m_prefFile;
64 
65 private:
66 
68  void load();
70  void save();
71 };
72 
73 } // namespace preferences
Preferences service API. This class represents the base interface for preferences services...
SPreferences() noexcept
Destructor.
::boost::filesystem::path m_prefFile
preference file
Service to load and save preferences.
The namespace preferences contains the service to manage the application&#39;s preferences (window size/p...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.