Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

Handler.h

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */
00016  
00017 #ifdef WIN32
00018 #pragma warning (disable : 4786)
00019 #endif
00020 
00021 #if !defined(__HANDLER_OF_AXIS_INCLUDED__)
00022 #define __HANDLER_OF_AXIS_INCLUDED__
00023 
00024 #include "BasicHandler.h"
00025 
00034 /*
00035  * Revision 1.1  2004/06/14 roshan
00036  * Added doxygen comments to help autobuild API docs
00037  * Added the implementations of getOption(const string& sArg) and 
00038  *  setOptionList(const map<string, string>* OptionList), because these methods
00039  *  are not needed to be implemented by the users. These are generic methods.
00040  */
00041 
00042 class Handler : public HandlerBase
00043 {
00044 public:
00048     Handler(){};
00049 
00053     virtual ~Handler(){};
00054 
00061     const string& getOption(const string& sArg)
00062         {
00063                 m_sEmpty = "";
00064 
00065                 map<string, string>::const_iterator it = m_pOption->find(sArg);
00066                 if (it != m_pOption->end())
00067                 {
00068                         return (*it).second;
00069                 }
00070                 return m_sEmpty;        
00071         }
00072 
00085     void setOptionList(const map<string, string>* OptionList) {m_pOption = OptionList;};
00086 
00094     int AXISCALL getType(){return NORMAL_HANDLER;};
00095 
00096 protected:
00100         const map<string, string>* m_pOption;
00101 
00105         string m_sEmpty;
00106 };
00107 
00108 #endif 
00109 

Generated on Fri Jul 9 13:18:29 2004 for AxisC++ by doxygen1.2.18