All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
te::common::OSSettingsDir Class Reference

A singleton class for discovering Operational System settings dir. More...

#include <OSSettingsDir.h>

Inheritance diagram for te::common::OSSettingsDir:
te::common::Singleton< OSSettingsDir >

Public Member Functions

const std::string & getSystemSettingsPath () const
 It returns the folder location to store application data applied to all users. More...
 
const std::string & getUserSettingsPath () const
 It returns the folder location to store per user data. More...
 

Static Public Member Functions

static OSSettingsDirgetInstance ()
 It returns a reference to the singleton instance. More...
 

Protected Member Functions

 OSSettingsDir ()
 It initializes the singleton. More...
 
 ~OSSettingsDir ()
 Destructor. More...
 

Private Attributes

std::string m_systemSettingsPath
 Folder to output data for all users. More...
 
std::string m_userSettingsPath
 Folder to output data by user. More...
 

Friends

class Singleton< OSSettingsDir >
 

Detailed Description

A singleton class for discovering Operational System settings dir.

Each Operational System has a default directory where applications may store user settings or the whole application settings (or system settings).

This class is a wrapper around each Operational System.

Definition at line 57 of file OSSettingsDir.h.

Constructor & Destructor Documentation

te::common::OSSettingsDir::OSSettingsDir ( )
protected

It initializes the singleton.

Definition at line 50 of file OSSettingsDir.cpp.

te::common::OSSettingsDir::~OSSettingsDir ( )
protected

Destructor.

Definition at line 102 of file OSSettingsDir.cpp.

Member Function Documentation

static OSSettingsDir & te::common::Singleton< OSSettingsDir >::getInstance ( )
staticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.

Referenced by te::common::SystemApplicationSettings::load(), te::common::UserApplicationSettings::load(), and te::qt::af::ApplicationPlugins::load().

const std::string & te::common::OSSettingsDir::getSystemSettingsPath ( ) const

It returns the folder location to store application data applied to all users.

Returns
The folder location to store application data applied to all users.

Definition at line 45 of file OSSettingsDir.cpp.

Referenced by te::common::SystemApplicationSettings::load(), and te::qt::af::ApplicationPlugins::load().

const std::string & te::common::OSSettingsDir::getUserSettingsPath ( ) const

It returns the folder location to store per user data.

Returns
The folder location to store per user data.

Definition at line 40 of file OSSettingsDir.cpp.

References m_userSettingsPath.

Referenced by te::common::UserApplicationSettings::load(), and te::qt::af::ApplicationPlugins::load().

Friends And Related Function Documentation

friend class Singleton< OSSettingsDir >
friend

Definition at line 59 of file OSSettingsDir.h.

Member Data Documentation

std::string te::common::OSSettingsDir::m_systemSettingsPath
private

Folder to output data for all users.

Definition at line 88 of file OSSettingsDir.h.

std::string te::common::OSSettingsDir::m_userSettingsPath
private

Folder to output data by user.

Definition at line 87 of file OSSettingsDir.h.

Referenced by getUserSettingsPath().


The documentation for this class was generated from the following files: