dodo
0.0.1
A C++ library to create containerized Linux services
|
Used to convey parsing succces. More...
#include <httpfragment.hpp>
Public Member Functions | |
ParseResult () | |
Default constructor sets to { parseError = peOk; systemError = common::SystemError::ecOK; } More... | |
ParseResult (ParseError pe, common::SystemError se) | |
Explicit constructor. More... | |
std::string | asString () const |
Return the ParseResult as a human readable string. More... | |
bool | eof () const |
Test if systemError == common::SystemError::ecEAGAIN More... | |
common::SystemError | getSystemError () const |
Return the systemError. More... | |
bool | ok () const |
Test if parseError == peOk && systemError == common::SystemError::ecOK . More... | |
void | setSystemError (common::SystemError se) |
Set the systemError. More... | |
Private Attributes | |
ParseError | parseError |
The parse eror. More... | |
common::SystemError | systemError |
The common::SystemError is parseError == peSystemError, undefined otherwise. More... | |
Used to convey parsing succces.
If parseError is peOk, the parse was succesfull. If parseError == peSystemError, systemError will be set to something else then SystemError::ecOK.
Definition at line 75 of file httpfragment.hpp.
|
inline |
Default constructor sets to { parseError = peOk; systemError = common::SystemError::ecOK; }
Definition at line 80 of file httpfragment.hpp.
References dodo::common::SystemError::ecOK, parseError, dodo::network::protocol::http::HTTPFragment::peOk, and systemError.
|
inline |
Explicit constructor.
pe | The ParseError to set. |
se | The SystemError to set. |
Definition at line 87 of file httpfragment.hpp.
References parseError, and systemError.
|
inline |
Return the ParseResult as a human readable string.
Definition at line 122 of file httpfragment.hpp.
References dodo::common::SystemError::asString(), dodo::network::protocol::http::HTTPFragment::getParseResultAsString(), parseError, and systemError.
|
inline |
Test if systemError == common::SystemError::ecEAGAIN
Definition at line 99 of file httpfragment.hpp.
References dodo::common::SystemError::ecEAGAIN, and systemError.
Referenced by dodo::network::protocol::http::HTTPRequest::parse(), dodo::network::protocol::http::HTTPResponse::parse(), dodo::network::protocol::http::HTTPMessage::parseChunkedBody(), and dodo::network::protocol::http::HTTPMessage::parseHeaders().
|
inline |
Return the systemError.
Definition at line 116 of file httpfragment.hpp.
References systemError.
Referenced by dodo::network::protocol::http::HTTPVersion::parse().
|
inline |
Test if parseError == peOk && systemError == common::SystemError::ecOK
.
Definition at line 93 of file httpfragment.hpp.
References dodo::common::SystemError::ecOK, parseError, dodo::network::protocol::http::HTTPFragment::peOk, and systemError.
Referenced by dodo::network::protocol::http::HTTPMessage::eatCRLF(), dodo::network::protocol::http::HTTPVersion::parse(), dodo::network::protocol::http::HTTPRequest::HTTPRequestLine::parse(), dodo::network::protocol::http::HTTPRequest::parse(), dodo::network::protocol::http::HTTPResponse::HTTPResponseLine::parse(), dodo::network::protocol::http::HTTPResponse::parse(), dodo::network::protocol::http::HTTPRequest::parseBody(), dodo::network::protocol::http::HTTPResponse::parseBody(), dodo::network::protocol::http::HTTPMessage::parseChunkedBody(), dodo::network::protocol::http::HTTPMessage::parseChunkHex(), dodo::network::protocol::http::HTTPMessage::parseCRLF(), dodo::network::protocol::http::HTTPMessage::parseFieldValue(), dodo::network::protocol::http::HTTPMessage::parseHeaders(), dodo::network::protocol::http::HTTPMessage::parseToken(), and dodo::network::protocol::http::HTTPMessage::parseUInt().
|
inline |
Set the systemError.
Implictly sets parseError to peOK ig se == common::SystemError::ecOK
and to peSystemError if se != common::SystemError::ecOK
se | The SystemError to set. |
Definition at line 106 of file httpfragment.hpp.
References dodo::common::SystemError::ecOK, parseError, dodo::network::protocol::http::HTTPFragment::peOk, dodo::network::protocol::http::HTTPFragment::peSystemError, and systemError.
Referenced by dodo::network::protocol::http::HTTPMessage::eatCRLF(), dodo::network::protocol::http::HTTPVersion::parse(), dodo::network::protocol::http::HTTPRequest::HTTPRequestLine::parse(), dodo::network::protocol::http::HTTPRequest::parse(), dodo::network::protocol::http::HTTPResponse::HTTPResponseLine::parse(), dodo::network::protocol::http::HTTPResponse::parse(), dodo::network::protocol::http::HTTPRequest::parseBody(), dodo::network::protocol::http::HTTPResponse::parseBody(), dodo::network::protocol::http::HTTPMessage::parseChunkedBody(), dodo::network::protocol::http::HTTPMessage::parseChunkHex(), dodo::network::protocol::http::HTTPMessage::parseCRLF(), dodo::network::protocol::http::HTTPMessage::parseFieldValue(), dodo::network::protocol::http::HTTPMessage::parseHeaders(), dodo::network::protocol::http::HTTPMessage::parseToken(), and dodo::network::protocol::http::HTTPMessage::parseUInt().
|
private |
The parse eror.
Definition at line 126 of file httpfragment.hpp.
Referenced by asString(), ok(), ParseResult(), and setSystemError().
|
private |
The common::SystemError is parseError == peSystemError, undefined otherwise.
Definition at line 128 of file httpfragment.hpp.
Referenced by asString(), eof(), getSystemError(), ok(), ParseResult(), and setSystemError().