fastdo  0.5.12
eienwebx::Response类 参考

代表一个客户响应 更多...

#include <webx_Response.hpp>

eienwebx::Response 的协作图:

Public 成员函数

 Response (Request &req, winux::SimplePointer< OutputMgr > outputMgr)
 
 ~Response ()
 
void echo (winux::String const &str)
 
void write (void const *data, int size)
 
void write (winux::Buffer const &buf)
 
void printf (char const *format,...)
 
winux::String getLocalEncoding () const
 
winux::String getTargetEncoding () const
 
winux::String convFrom (winux::String const &str) const
 
winux::String convTo (winux::String const &str) const
 
void setMimeType (winux::String const &mime)
 设置MIME 更多...
 
winux::String getMimeType () const
 获取MIME 更多...
 
void setAutoContentType (bool autoContentType=true)
 是否自动设置Content-Type 更多...
 
void setCharset (winux::String const &charset)
 设置charset,即设置输出目标编码 更多...
 
winux::String getCharset () const
 获取charset,即输出目标编码 更多...
 
void import (winux::String const &doFile, void *runParam=NULL, int *retCode=NULL)
 import一个do文件,并把它的输出作为自己的输出,若错误则显示错误 更多...
 

Public 属性

Requestrequest
 Request对象的引用 更多...
 
http::Headerheader
 头部引用 更多...
 

详细描述

代表一个客户响应

在文件 webx_Response.hpp12 行定义.

构造及析构函数说明

eienwebx::Response::Response ( Request req,
winux::SimplePointer< OutputMgr outputMgr 
)
eienwebx::Response::~Response ( )

成员函数说明

winux::String eienwebx::Response::convFrom ( winux::String const &  str) const
winux::String eienwebx::Response::convTo ( winux::String const &  str) const
void eienwebx::Response::echo ( winux::String const &  str)
winux::String eienwebx::Response::getCharset ( ) const

获取charset,即输出目标编码

winux::String eienwebx::Response::getLocalEncoding ( ) const
winux::String eienwebx::Response::getMimeType ( ) const
inline

获取MIME

在文件 webx_Response.hpp32 行定义.

winux::String eienwebx::Response::getTargetEncoding ( ) const
void eienwebx::Response::import ( winux::String const &  doFile,
void *  runParam = NULL,
int *  retCode = NULL 
)

import一个do文件,并把它的输出作为自己的输出,若错误则显示错误

参数
doFile文件路径
runParam应传入WebMain()传来的runParam,如果是NULL,将从FcgiApp取得runParam
retCode表示导入do的WebMain()返回代码,为NULL则忽略此值
void eienwebx::Response::printf ( char const *  format,
  ... 
)
void eienwebx::Response::setAutoContentType ( bool  autoContentType = true)
inline

是否自动设置Content-Type

Response在即将完成输出前会配合MIME和目标编码自动设置Content-Type
如果MIME不是文本,则不会设置charset部分

在文件 webx_Response.hpp38 行定义.

void eienwebx::Response::setCharset ( winux::String const &  charset)

设置charset,即设置输出目标编码

void eienwebx::Response::setMimeType ( winux::String const &  mime)
inline

设置MIME

在文件 webx_Response.hpp30 行定义.

void eienwebx::Response::write ( void const *  data,
int  size 
)
void eienwebx::Response::write ( winux::Buffer const &  buf)

类成员变量说明

http::Header& eienwebx::Response::header

头部引用

在文件 webx_Response.hpp53 行定义.

Request& eienwebx::Response::request

Request对象的引用

在文件 webx_Response.hpp52 行定义.


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