OSDN Git Service

Check the gcc version to determin boost so name.
[ultramonkey-l7/sslproxy.git] / parameter / parameter.h
1 /*
2  * @file  parameter.h
3  * @brief parameter module creation class.
4  *
5  * L7VSD: Linux Virtual Server for Layer7 Load Balancing
6  * Copyright (C) 2008  NTT COMWARE Corporation.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *      
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  **********************************************************************/
24
25 #ifndef __PARAMETER_H__
26 #define __PARAMETER_H__
27
28 #include <iostream>
29 #include <map>
30 #include "parameter_enum.h"
31
32 namespace l7vs
33 {
34         class ParameterImpl;
35         class Parameter
36         {
37         private:
38                 static Parameter instance;
39                 
40         protected:
41                 Parameter();
42                 Parameter( const Parameter& );
43                 Parameter&      operator=( const Parameter& );
44                 ~Parameter();
45                 
46         public:
47                 bool    rereadFile(const PARAMETER_COMPONENT_TAG, const std::string&);
48         
49                 static  Parameter& getInstance(){
50                         return  instance;
51                 }
52                 bool    isIntExist(const PARAMETER_COMPONENT_TAG, const std::string&);
53                 bool    isStringExist(const PARAMETER_COMPONENT_TAG, const std::string&);
54                 int     getIntValue(const PARAMETER_COMPONENT_TAG, const std::string&);
55                 std::string     getStringValue(const PARAMETER_COMPONENT_TAG, const std::string&);
56                 void    getStringMapValue( const PARAMETER_COMPONENT_TAG, const std::string&, std::multimap<std::string, std::string>&);
57                 void    registerFunctionPointer(const PARAMETER_COMPONENT_TAG, void(*)());
58         };
59 }
60         
61 #endif  //__PARAMETER_H__