-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathProjectMSDLApplication.h
54 lines (41 loc) · 1.79 KB
/
ProjectMSDLApplication.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <Poco/Util/Application.h>
#include <Poco/Util/MapConfiguration.h>
#include <Poco/Util/PropertyFileConfiguration.h>
class ProjectMSDLApplication : public Poco::Util::Application
{
public:
ProjectMSDLApplication();
const char* name() const override;
/**
* @brief Returns the instance of the projectMSDL application.
* @return The instance of the projectMSDL application.
*/
static ProjectMSDLApplication& instance();
/**
* @brief Returns the user configuration layer.
* @return The configuration instance which stores the settings for the current user.
*/
Poco::AutoPtr<Poco::Util::PropertyFileConfiguration> UserConfiguration();
/**
* @brief Returns the command line override map.
* @return The properties file instance which stores the UI settings.
*/
Poco::AutoPtr<Poco::Util::MapConfiguration> CommandLineConfiguration();
protected:
void initialize(Application& self) override;
void uninitialize() override;
void defineOptions(Poco::Util::OptionSet& options) override;
int main(const std::vector<std::string>& args) override;
/**
* @brief Display help and exit.
* @param name Unused.
* @param value Unused.
*/
void DisplayHelp(const std::string& name, const std::string& value);
void ListAudioDevices(const std::string& name, const std::string& value);
Poco::AutoPtr<Poco::Util::PropertyFileConfiguration> _userConfiguration{
new Poco::Util::PropertyFileConfiguration()}; //!< The current user's configuration, used to store/reset changes made in the UI's settings dialog.
Poco::AutoPtr<Poco::Util::MapConfiguration> _commandLineOverrides{
new Poco::Util::MapConfiguration()}; //!< Map configuration with overrides set by command line arguments.
};