Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

Handler.hpp

00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003 // (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
00004  *
00005  *   Licensed under the Apache License, Version 2.0 (the "License");
00006  *   you may not use this file except in compliance with the License.
00007  *   You may obtain a copy of the License at
00008  *
00009  *       http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  *   Unless required by applicable law or agreed to in writing, software
00012  *   distributed under the License is distributed on an "AS IS" BASIS,
00013  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *   See the License for the specific language governing permissions and
00015  *   limitations under the License.
00016  */
00017  
00018 #ifdef WIN32
00019 #pragma warning (disable : 4786)
00020 #endif
00021 
00022 #if !defined(__HANDLER_OF_AXIS_INCLUDED__)
00023 #define __HANDLER_OF_AXIS_INCLUDED__
00024 
00025 #include "BasicHandler.hpp"
00026 
00035 /*
00036  * Revision 1.1  2004/06/14 roshan
00037  * Added doxygen comments to help autobuild API docs
00038  * Added the implementations of getOption(const string& sArg) and 
00039  *  setOptionList(const map<string, string>* OptionList), because these methods
00040  *  are not needed to be implemented by the users. These are generic methods.
00041  */
00042 
00043 AXIS_CPP_NAMESPACE_START
00044 
00045 class Handler : public HandlerBase
00046 {
00047 public:
00051     Handler(){};
00052 
00056     virtual ~Handler(){};
00057 
00064     const string& getOption(const string& sArg)
00065         {
00066                 m_sEmpty = "";
00067 
00068                 map<string, string>::const_iterator it = m_pOption->find(sArg);
00069                 if (it != m_pOption->end())
00070                 {
00071                         return (*it).second;
00072                 }
00073                 return m_sEmpty;        
00074         }
00075 
00088     void setOptionList(const map<string, string>* OptionList) {m_pOption = OptionList;};
00089 
00097     int AXISCALL getType(){return NORMAL_HANDLER;};
00098 
00099 protected:
00103         const map<string, string>* m_pOption;
00104 
00108         string m_sEmpty;
00109 };
00110 
00111 AXIS_CPP_NAMESPACE_END
00112 
00113 #endif 
00114 

Generated on Sat Apr 9 15:02:03 2005 for AxisC++ by doxygen 1.3.6