chenke
2017-08-09 784f977cc7f9b9aad8cc3528a4f2026c1f686a0a
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
//
// 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