| 
    fastdo
    0.5.12
    
   | 
 
Fcgi输出管理器 更多...
#include <fcgiplus.hpp>
Public 成员函数 | |
| FcgiOutputMgr (struct FCGX_Stream *fcgiOut, struct FCGX_Stream *fcgiErr) | |
| ~FcgiOutputMgr () | |
| void | setLocalEncoding (winux::String const &local) | 
| 指定本地编码(Response会自动设置本地编码)  更多... | |
| void | setTargetEncoding (winux::String const &target) | 
| 指定目标编码(Response不会自动设置)  更多... | |
| 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 | echo (winux::String const &str) | 
| void | write (void const *data, int size) | 
| void | printf (char const *format, va_list va) | 
| winux::uint | getCacheOutStreamSize () const | 
| 获取缓冲输出流中数据的大小  更多... | |
| winux::uint | getConvertedContentSize () | 
| 获取编码转换后的内容大小  更多... | |
友元 | |
| class | Response | 
Fcgi输出管理器
该类把标准流重定向到指定流(fcgi流),以便我们用cout输出html
该类会把输出流重定向到一个缓冲区流,从而延缓输出,以便我们方便设置HTTP头和计算内容长度 
在文件 fcgiplus.hpp 第 193 行定义.
| fcgi::FcgiOutputMgr::FcgiOutputMgr | ( | struct FCGX_Stream * | fcgiOut, | 
| struct FCGX_Stream * | fcgiErr | ||
| ) | 
| fcgi::FcgiOutputMgr::~FcgiOutputMgr | ( | ) | 
| winux::String fcgi::FcgiOutputMgr::convFrom | ( | winux::String const & | str | ) | const | 
目标编码转到本地编码
| winux::String fcgi::FcgiOutputMgr::convTo | ( | winux::String const & | str | ) | const | 
本地编码转到目标编码
| void fcgi::FcgiOutputMgr::echo | ( | winux::String const & | str | ) | 
| winux::uint fcgi::FcgiOutputMgr::getCacheOutStreamSize | ( | ) | const | 
获取缓冲输出流中数据的大小
| winux::uint fcgi::FcgiOutputMgr::getConvertedContentSize | ( | ) | 
获取编码转换后的内容大小
| winux::String fcgi::FcgiOutputMgr::getLocalEncoding | ( | ) | const | 
| winux::String fcgi::FcgiOutputMgr::getTargetEncoding | ( | ) | const | 
| void fcgi::FcgiOutputMgr::printf | ( | char const * | format, | 
| va_list | va | ||
| ) | 
| void fcgi::FcgiOutputMgr::setLocalEncoding | ( | winux::String const & | local | ) | 
指定本地编码(Response会自动设置本地编码)
本地编码指编译器的默认编码,visualstudio是gbk,gcc是utf-8
设置字符串编码信息setLocalEncoding()/setTargetEncoding() 
| void fcgi::FcgiOutputMgr::setTargetEncoding | ( | winux::String const & | target | ) | 
指定目标编码(Response不会自动设置)
目标编码要和Content-Type的charset对应
| void fcgi::FcgiOutputMgr::write | ( | void const * | data, | 
| int | size | ||
| ) | 
      
  | 
  friend | 
在文件 fcgiplus.hpp 第 240 行定义.