fastdo  0.5.12
fcgi::FcgiApp类 参考

FCGI程序类,代表整个FCGI程序 更多...

#include <fcgiplus.hpp>

fcgi::FcgiApp 的协作图:

struct  ConfigParams
 配置参数 更多...
 

Public 类型

enum  ErrorCode { Err_Success, Err_DoFileNotFound, Err_WebMainNotFound, Err_InfiniteRecursion }
 执行do文件的错误码 更多...
 

Public 成员函数

 FcgiApp (winux::Configure &conf, struct FcgiServerData *servData=NULL)
 构造函数,初始化操作 更多...
 
 ~FcgiApp ()
 
int run (void *runParam)
 运行处理 更多...
 
void * getParam () const
 取得do传递的参数 更多...
 
template<typename _Ty >
_Ty getParam () const
 
void setParam (void *param)
 设置do传递参数 更多...
 
void * getRunParam () const
 取得run()传递的参数 更多...
 
template<typename _Ty >
_Ty getRunParam () const
 
struct FcgiServerDatagetServerData ()
 取得服务器相关数据 更多...
 
void setServerData (struct FcgiServerData *data)
 
SessionServergetSessServ ()
 取得/设置SessionServer 更多...
 
void setSessServ (SessionServer *sessServ)
 
virtual ErrorCode execWebMain (Response *rsp, void *runParam, int *retCode)
 执行生成页面内容的过程 更多...
 
ErrorCode importDoFile (winux::String const &doFile, Response *rsp, void *runParam, int *retCode, winux::String *errDetail)
 import一个do文件,并把它的输出作为指定rsp的输出 更多...
 
int loadedDoFiles (winux::Mixed *arrDoFiles) const
 产品模式下,显示所有已经加载的do文件 更多...
 
bool unloadDoFile (winux::String const &doFullPath)
 卸载指定的do文件,如果是当前页面则不会释放 更多...
 
winux::DllLoaderloadModule (winux::String const &modFile)
 加载一个模块,若已经加载则返回其引用. 更多...
 
int loadedModules (winux::Mixed *arrModules) const
 显示已经加载的模块 更多...
 
bool unloadModule (winux::String const &modFile)
 卸载一个模块 更多...
 

Public 属性

Request request
 请求 更多...
 
winux::Configureconfig
 配置 更多...
 
struct fcgi::FcgiApp::ConfigParams configParams
 

友元

class Request
 
class Response
 

详细描述

FCGI程序类,代表整个FCGI程序

在文件 fcgiplus.hpp297 行定义.

成员枚举类型说明

执行do文件的错误码

枚举值
Err_Success 
Err_DoFileNotFound 
Err_WebMainNotFound 
Err_InfiniteRecursion 

在文件 fcgiplus.hpp333 行定义.

构造及析构函数说明

fcgi::FcgiApp::FcgiApp ( winux::Configure conf,
struct FcgiServerData servData = NULL 
)

构造函数,初始化操作

参数
conf配置对象
servDatafcgiserv传入的数据
fcgi::FcgiApp::~FcgiApp ( )

成员函数说明

virtual ErrorCode fcgi::FcgiApp::execWebMain ( Response rsp,
void *  runParam,
int *  retCode 
)
virtual

执行生成页面内容的过程

默认将以SCRIPT_FILENAME载入动态模块的方式运行处理

返回
0:表示成功,1:表示找不到或无权限,2:表示没有WebMain()
void* fcgi::FcgiApp::getParam ( ) const
inline

取得do传递的参数

在文件 fcgiplus.hpp312 行定义.

template<typename _Ty >
_Ty fcgi::FcgiApp::getParam ( ) const
inline

在文件 fcgiplus.hpp314 行定义.

void* fcgi::FcgiApp::getRunParam ( ) const
inline

取得run()传递的参数

在文件 fcgiplus.hpp320 行定义.

template<typename _Ty >
_Ty fcgi::FcgiApp::getRunParam ( ) const
inline

在文件 fcgiplus.hpp322 行定义.

struct FcgiServerData* fcgi::FcgiApp::getServerData ( )
inline

取得服务器相关数据

在文件 fcgiplus.hpp325 行定义.

SessionServer* fcgi::FcgiApp::getSessServ ( )
inline

取得/设置SessionServer

在文件 fcgiplus.hpp329 行定义.

ErrorCode fcgi::FcgiApp::importDoFile ( winux::String const &  doFile,
Response rsp,
void *  runParam,
int *  retCode,
winux::String errDetail 
)

import一个do文件,并把它的输出作为指定rsp的输出

参数
doFiledo文件路径
rsp指示输出到的Response对象
retCode表示导入do的WebMain()返回代码,为NULL则忽略此值
errDetail载入do的详细错误信息
返回
0:表示导入成功,1:表示找不到或无权限,2:表示没有WebMain(),3:表示无穷递归调用了
int fcgi::FcgiApp::loadedDoFiles ( winux::Mixed arrDoFiles) const

产品模式下,显示所有已经加载的do文件

int fcgi::FcgiApp::loadedModules ( winux::Mixed arrModules) const

显示已经加载的模块

winux::DllLoader& fcgi::FcgiApp::loadModule ( winux::String const &  modFile)

加载一个模块,若已经加载则返回其引用.

int fcgi::FcgiApp::run ( void *  runParam)

运行处理

void fcgi::FcgiApp::setParam ( void *  param)
inline

设置do传递参数

在文件 fcgiplus.hpp317 行定义.

void fcgi::FcgiApp::setServerData ( struct FcgiServerData data)
inline

在文件 fcgiplus.hpp326 行定义.

void fcgi::FcgiApp::setSessServ ( SessionServer sessServ)
inline

在文件 fcgiplus.hpp330 行定义.

bool fcgi::FcgiApp::unloadDoFile ( winux::String const &  doFullPath)

卸载指定的do文件,如果是当前页面则不会释放

bool fcgi::FcgiApp::unloadModule ( winux::String const &  modFile)

卸载一个模块

友元及相关函数文档

friend class Request
friend

在文件 fcgiplus.hpp413 行定义.

friend class Response
friend

在文件 fcgiplus.hpp414 行定义.

类成员变量说明

winux::Configure& fcgi::FcgiApp::config

配置

在文件 fcgiplus.hpp375 行定义.

struct fcgi::FcgiApp::ConfigParams fcgi::FcgiApp::configParams
Request fcgi::FcgiApp::request

请求

在文件 fcgiplus.hpp372 行定义.


该类的文档由以下文件生成: