OSDN Git Service

Persist sorry server connection.
[ultramonkey-l7/ultramonkey-l7-v2.git] / parameter / parameter.h
1 #ifndef __PARAMETER_H__
2 #define __PARAMETER_H__
3
4 #include <iostream>
5 #include "parameter_enum.h"
6
7 namespace l7vs
8 {
9         class ParameterImpl;
10         class Parameter
11         {
12         private:
13                 static Parameter instance;
14                 
15         protected:
16                 Parameter();
17                 Parameter( const Parameter& );
18                 Parameter&      operator=( const Parameter& );
19                 ~Parameter();
20                 
21         public:
22                 bool    rereadFile(const PARAMETER_COMPONENT_TAG);
23         
24                 inline static   Parameter& getInstance(){
25                         return  instance;
26                 }
27                 bool    isIntExist(const PARAMETER_COMPONENT_TAG, const std::string&);
28                 bool    isStringExist(const PARAMETER_COMPONENT_TAG, const std::string&);
29                 int     getIntValue(const PARAMETER_COMPONENT_TAG, const std::string&);
30                 std::string     getStringValue(const PARAMETER_COMPONENT_TAG, const std::string&);
31                 void    registerFunctionPointer(const PARAMETER_COMPONENT_TAG, void(*)());
32         };
33 }
34         
35 #endif  //__PARAMETER_H__