1 #ifndef __HTTP_HEADER_HPP__ 2 #define __HTTP_HEADER_HPP__ 23 virtual winux::String toString(
bool semicolonSpace =
true,
bool commaSpace =
false,
bool keyNoValForceQuote =
false,
bool valueForceQuote =
false )
const;
28 bool hasOption(
winux::String const & name,
size_t i = 0 )
const {
return i < _optionss.size() && _optionss[i].has(name); }
35 void setFirstVal(
winux::String const & firstVal,
size_t i = 0 );
72 Header( std::initializer_list< std::pair< winux::String, winux::Mixed > > list );
87 template <
typename _Ty > _Ty
getHeader(
winux::String const & name, _Ty
const & defval = _Ty() )
const {
return _headers.has(name) ? (_Ty)_headers[name] : defval; }
98 template <
typename _HeaderField >
101 if ( _headers.has(name) )
103 field->parse( *_headers[name]._pStr );
108 template <
typename _HeaderField >
112 f.parse( (*
this)[name] );
127 void delMultiHeader(
int index );
132 void setResponseLine(
winux::String const & responseLine,
bool setStatus =
true );
177 std::vector< std::pair< winux::String, winux::String > > _multiHeaders;
180 mutable int _curHeaderIndex;
181 mutable int _curMultiHeaderIndex;
182 mutable bool _isCompleteEnum;
188 #endif // __HTTP_HEADER_HPP__
用来使得String能够用operator<<来赋值
XStringArray< tchar > StringArray