File: SettingsMapper.h

package info (click to toggle)
dc-qt 0.2.0.alpha-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,948 kB
  • ctags: 5,361
  • sloc: cpp: 28,936; makefile: 19
file content (26 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (4)
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
#ifndef SETTINGSMAPPER_H__
#define SETTINGSMAPPER_H__

#include <dcpp/stdinc.h>
#include <dcpp/DCPlusPlus.h>
#include <dcpp/SettingsManager.h>
#include <map>
#include <boost/any.hpp>
using namespace std;

//! Maps settings between dc-qt and dc++ format, keys have same names but as strings.
class SettingsMapper
{
 public:
  boost::any getSetting(const string& key);
  void setSetting(const string& key,const boost::any& value);
  static SettingsMapper* instance() {if(!inst) inst=new SettingsMapper;return inst;}
private:
  static SettingsMapper* inst;
  SettingsMapper();
  map<string,int> sm;
};



#endif