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

WSDDHandler.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(_WSDDHANDLER_H__NCLUDED_)
00022 #define _WSDDHANDLER_H__NCLUDED_
00023 
00024 #include "GDefine.h"
00025 #include <string>
00026 #include <map>
00027 #include <list>
00028 
00029 using namespace std;
00030 
00031 enum AXIS_HANDLER_SCOPE {AH_APPLICATION=1, AH_SESSION, AH_REQUEST};
00032 
00033 const AxisChar kw_scope_app[] = "application";
00034 const AxisChar kw_scope_ses[] = "session";
00035 const AxisChar kw_scope_req[] = "request";
00036 
00043 class WSDDHandler  
00044 {
00045 public:
00046     const AxisChar* getLibName() const;
00047     int getLibId() const;
00048     int getScope() const;
00049     void setScope(const AxisChar* sScope);
00050     void setLibName(const AxisChar* sLibName);
00051     void setLibId(int nLibId);
00052     void setName(const AxisChar* sName);
00053     const AxisChar* getParameter(const AxisChar* sKey) const;
00054     void addParameter(const AxisChar* sKey, const AxisChar* sValue);
00055     const map<AxisString, AxisString>* getParameterList() const; 
00056     WSDDHandler();
00057     virtual ~WSDDHandler();
00058     void setDescription(const AxisChar* sDescription);
00059     const AxisChar* getDescription() const;
00060     virtual int updateWSDD(FILE* wsddfile, int tabcount);
00061 public:
00062     void printTabs(int count);
00063     WSDDHandler& operator << (const char* str);
00064 protected:
00065     int m_nLibId;
00066     int m_nScope;
00067     AxisString m_sName;
00068     AxisString m_sLibName;
00069     AxisString m_sDescription;
00070     map<AxisString, AxisString>* m_Params;
00071     FILE* m_file; /* temporary file handler to wsdd file */
00072 };
00073 
00074 typedef list<WSDDHandler*> WSDDHandlerList;
00075 
00076 #endif 
00077 

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