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

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