00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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;
00073 };
00074
00075 typedef list<WSDDHandler*> WSDDHandlerList;
00076
00077 #endif
00078