📄 apachemodule.hpp
字号:
//// This file is part of the "More for C++" library//// Copyright (c) 1999-2003 by Thorsten Goertz (thorsten@morefor.org)//// The "More for C++" library is free software; you can redistribute it and/or// modify it under the terms of the license that comes with this package.//// Read "license.txt" for more details.//// THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES// OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.////////////////////////////////////////////////////////////////////////////////#ifndef MORE_SERVLET_APACHE_APACHEMODULE_HPP#define MORE_SERVLET_APACHE_APACHEMODULE_HPP////////////////////////////////////////////////////////////////////////////////#include <more/features.hpp>#ifndef MORE_APACHE_ENABLED# error "More for C++: support for Apache has not been enabled"#endif#include <more/pointer.hpp>#include <more/stl.hpp>#include <more/string.hpp>#include <more/servlet/httpservlet.hpp>////////////////////////////////////////////////////////////////////////////////#ifdef CC_VISUAL_C# define MOD_EXPORT __declspec( dllexport )#else# define MOD_EXPORT#endifextern "C"{ typedef struct { unsigned char bytes[4096]; } module_descriptor;}////////////////////////////////////////////////////////////////////////////////namespace more{ namespace servlet { namespace apache { class ApacheModule { public: protected: ApacheModule( module_descriptor& ); virtual ~ApacheModule( ); virtual void onInit( ) = 0; void registerServlet( const String& sNameOfHandler, const p<HttpServlet>& pHttpServlet ); private: typedef std::map<String, p<HttpServlet> > ServletMap; typedef ServletMap::const_iterator ServletMapIterator; static void init( void*, void* ); static int onRequest( void* ); static ApacheModule* pInstance; module_descriptor& m_rModuleDescriptor; ServletMap m_servletMap; }; } }}////////////////////////////////////////////////////////////////////////////////#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -