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 #include <map>
00026 
00027 using namespace std;
00036 /*
00037  * Revision 1.1  2004/06/14 roshan
00038  * Added doxygen comments to help autobuild API docs
00039  * Added the implementations of getOption(const string& sArg) and 
00040  *  setOptionList(const map<string, string>* OptionList), because these methods
00041  *  are not needed to be implemented by the users. These are generic methods.
00042  */
00043 
00044 class Handler : public HandlerBase
00045 {
00046 public:
00050     Handler(){};
00051 
00055     virtual ~Handler(){};
00056 
00063     const string& getOption(const string& sArg)
00064         {
00065                 m_sEmpty = "";
00066 
00067                 map<string, string>::const_iterator it = m_pOption->find(sArg);
00068                 if (it != m_pOption->end())
00069                 {
00070                         return (*it).second;
00071                 }
00072                 return m_sEmpty;        
00073         }
00074 
00087     void setOptionList(const map<string, string>* OptionList) {m_pOption = OptionList;};
00088 
00096     int AXISCALL getType(){return NORMAL_HANDLER;};
00097 
00098 protected:
00102         const map<string, string>* m_pOption;
00103 
00107         string m_sEmpty;
00108 };
00109 
00110 #endif 
00111 

Generated on Tue Jun 29 09:27:56 2004 for AxisC++ by doxygen1.2.18