Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[b7a122]: src / org / esb / config / config.h Maximize Restore History

Download this file

config.h    49 lines (46 with data), 1.2 kB

 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* aviserv.cpp
*
* Copyright 2001-2005, EsbLab (www.esblab.com). All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef ESBCONFIG_H
#define ESBCONFIG_H
#include "org/esb/util/StringTokenizer.h"
#include "org/esb/util/Properties.h"
#include "org/esb/util/Log.h"
//#include "org/esb/util/Properties.h"
#include <iostream>
#include <stdlib.h>
#include <map>
using namespace std;
using namespace org::esb::util;
namespace org
{
namespace esb
{
namespace config
{
class Config
{
classlogger("org.esb.config.Config")
public:
static void close();
static void save2db();
static const char * getProperty( const char * key, const char * def="");
static std::string get(std::string key, std::string def=std::string());
static void setProperty(std::string key, std::string val);
static Properties * getProperties();
static void reload();
static void loadConfigFile(const std::string filename);
//static void loadFromDb();
private:
static bool init();
static void parseLine(const char*);
static bool _isInitialized;
};
}
}
}
#endif