blacklib folder reorganisation

This commit is contained in:
Roland Winklmeier
2013-03-11 20:41:29 +01:00
parent a0a7049785
commit 4e219f14a8
118 changed files with 8297 additions and 5 deletions

View File

@@ -0,0 +1,59 @@
//! Copyright (C) 2013 Roland Winklmeier
//! This Source Code Form is subject to the terms of the Mozilla Public
//! License, v. 2.0. If a copy of the MPL was not distributed with this
//! file, You can obtain one at http://mozilla.org/MPL/2.0/
#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H
#include <QMap>
#include <QString>
#include "blackmisc/context.h"
namespace BlackMisc
{
class CConfig;
class CConfigManager
{
// safe singleton declaration
SINGLETON_CLASS_DECLARATION(CConfigManager)
CConfigManager();
public:
//! Configuration Manager error codes.
/*! This enum lists all errors, which can appear. If you need
* a readable output then consider using /sa getErrorString()
*/
typedef enum { UNKNOWN_PATH = 0, /*!< Type String. */
} TErrorCodes;
//! Sets the global path, where all the config files are located
/*!
\param path absolute pathname
*/
void setConfigPath(QString &path);
int readConfig(bool forceReload = false);
int writeConfig();
void clear();
CConfig *getConfig(const QString &section);
private:
typedef QMap<QString, CConfig*> TConfigMap;
TConfigMap m_config_map;
QString m_config_path;
};
} // namespace BlackLib
#endif // CONFIGMANAGER_H