App.hpp
Go to the documentation of this file.
1 // @formatter:off
2 //
3 // Balau core C++ library
4 //
5 // Copyright (C) 2008 Bora Software (contact@borasoftware.com)
6 //
7 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
8 // See the LICENSE file for the full license text.
9 //
10 
16 
17 #ifndef COM_BORA_SOFTWARE__BALAU_UTIL__APP
18 #define COM_BORA_SOFTWARE__BALAU_UTIL__APP
19 
20 #include <Balau/Util/Impl/AppImpl.hpp>
21 
22 namespace Balau::Util {
23 
27 struct App final {
45  static Resource::File getUserApplicationDataDirectory(const std::string & appGroup, const std::string & appName) {
46  static Resource::File instance = Impl::AppImpl::getUserApplicationDataDirectory(appGroup, appName);
47  return instance;
48  }
49 
65  static Resource::File getGlobalApplicationDataDirectory(const std::string & appGroup, const std::string & appName) {
66  static Resource::File instance = Impl::AppImpl::getGlobalApplicationDataDirectory(appGroup, appName);
67  return instance;
68  }
69 
87  static Resource::File getUserApplicationConfigDirectory(const std::string & appGroup, const std::string & appName) {
88  static Resource::File instance = Impl::AppImpl::getUserApplicationConfigDirectory(appGroup, appName);
89  return instance;
90  }
91 
107  static Resource::File getGlobalApplicationConfigDirectory(const std::string & appGroup, const std::string & appName) {
108  static Resource::File instance = Impl::AppImpl::getGlobalApplicationConfigDirectory(appGroup, appName);
109  return instance;
110  }
111 
146  static Resource::File getApplicationRuntimeDataDirectory(const std::string & appGroup, const std::string & appName) {
147  static Resource::File instance = Impl::AppImpl::getApplicationRuntimeDataDirectory(appGroup, appName);
148  return instance;
149  }
150 
152 
153  App() = delete;
154  App(const App &) = delete;
155  App & operator = (const App &) = delete;
156 };
157 
158 } // namespace Balau::Util
159 
160 #endif // COM_BORA_SOFTWARE__BALAU_UTIL__APP
static Resource::File getUserApplicationDataDirectory(const std::string &appGroup, const std::string &appName)
Get the user data directory for the specified application group/name.
Definition: App.hpp:45
Utilities for accessing application information.
Definition: App.hpp:27
static Resource::File getApplicationRuntimeDataDirectory(const std::string &appGroup, const std::string &appName)
Get the runtime data directory for the current application.
Definition: App.hpp:146
Utility functions.
static Resource::File getUserApplicationConfigDirectory(const std::string &appGroup, const std::string &appName)
Get the user config directory for the specified application group/name.
Definition: App.hpp:87
static Resource::File getGlobalApplicationDataDirectory(const std::string &appGroup, const std::string &appName)
Get the global data directory for the specified application group/name.
Definition: App.hpp:65
A file on the local file system.
Definition: File.hpp:35
static Resource::File getGlobalApplicationConfigDirectory(const std::string &appGroup, const std::string &appName)
Get the global config directory for the specified application group/name.
Definition: App.hpp:107