dodo  0.0.1
A C++ library to create containerized Linux services
dodo::network::protocol::http::HTTPFragment::ParseResult Struct Reference

Used to convey parsing succces. More...

#include <httpfragment.hpp>

Collaboration diagram for dodo::network::protocol::http::HTTPFragment::ParseResult:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ParseResult() [1/2]

dodo::network::protocol::http::HTTPFragment::ParseResult::ParseResult ( )
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.

◆ ParseResult() [2/2]

dodo::network::protocol::http::HTTPFragment::ParseResult::ParseResult ( ParseError  pe,
common::SystemError  se 
)
inline

Explicit constructor.

Parameters
peThe ParseError to set.
seThe SystemError to set.

Definition at line 87 of file httpfragment.hpp.

References parseError, and systemError.

Member Function Documentation

◆ asString()

std::string dodo::network::protocol::http::HTTPFragment::ParseResult::asString ( ) const
inline

Return the ParseResult as a human readable string.

Returns
The ParseResult as a string.

Definition at line 122 of file httpfragment.hpp.

References dodo::common::SystemError::asString(), dodo::network::protocol::http::HTTPFragment::getParseResultAsString(), parseError, and systemError.

Here is the call graph for this function:

◆ eof()

bool dodo::network::protocol::http::HTTPFragment::ParseResult::eof ( ) const
inline

◆ getSystemError()

common::SystemError dodo::network::protocol::http::HTTPFragment::ParseResult::getSystemError ( ) const
inline

Return the systemError.

Returns
thesystemError part.

Definition at line 116 of file httpfragment.hpp.

References systemError.

Referenced by dodo::network::protocol::http::HTTPVersion::parse().

Here is the caller graph for this function:

◆ ok()

◆ setSystemError()

Field Documentation

◆ parseError

ParseError dodo::network::protocol::http::HTTPFragment::ParseResult::parseError
private

The parse eror.

Definition at line 126 of file httpfragment.hpp.

Referenced by asString(), ok(), ParseResult(), and setSystemError().

◆ systemError

common::SystemError dodo::network::protocol::http::HTTPFragment::ParseResult::systemError
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().


The documentation for this struct was generated from the following file: