houxiao
2017-08-16 a188ad2e23ef190c8a044b17bc467fa3e2ae0ca5
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
//
// Created by ke.chen on 2017/8/7.
//
 
#ifndef RTSPNATIVECODEC_APPCONFIG_H
#define RTSPNATIVECODEC_APPCONFIG_H
 
#include <json.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
 
using namespace std;
 
class AppConfig
{
public:
    AppConfig();
    ~AppConfig();
 
    string getStringValue(string key);
    int getIntValue(string key);
    void setStringValue(string key, string value);
    void setIntValue(string key, int value);
    void loadConfig(string path);
    void save(string path);
    void clear();
 
private:
    Json::Value root;
};
 
#endif //RTSPNATIVECODEC_APPCONFIG_H