NetFlex  0.0.0
C++11 HTTP Server Library.
Public Member Functions | Protected Attributes | List of all members
netflex::parsing::parser_iface Class Referenceabstract

#include <parser_iface.hpp>

Inheritance diagram for netflex::parsing::parser_iface:
netflex::parsing::header_field_parser netflex::parsing::header_fields_parser netflex::parsing::message_body_chuncked_parser netflex::parsing::message_body_compress_parser netflex::parsing::message_body_content_length_parser netflex::parsing::message_body_deflate_parser netflex::parsing::message_body_gzip_parser netflex::parsing::message_body_parser netflex::parsing::start_line_parser

Public Member Functions

 parser_iface (http::request &request)
 
virtual ~parser_iface (void)=default
 default dtor
 
virtual parser_ifaceoperator<< (std::string &data)=0
 
virtual bool is_done (void) const =0
 

Protected Attributes

http::requestm_request
 

Detailed Description

parser interface that must be implemented by all parsers

Constructor & Destructor Documentation

◆ parser_iface()

netflex::parsing::parser_iface::parser_iface ( http::request request)
explicit

default ctor

Parameters
requestrequest to be initialized

Member Function Documentation

◆ is_done()

virtual bool netflex::parsing::parser_iface::is_done ( void  ) const
pure virtual

◆ operator<<()

virtual parser_iface& netflex::parsing::parser_iface::operator<< ( std::string &  data)
pure virtual

consume input data to parse it and init the request if not enough data is passed in, this method would need to be called again later input data is modified whenever a token is consumed by parsing, even if parsing is incomplete or invalid invalid data would lead to a raised exception

Parameters
datainput data to be parsed
Returns
reference to the current object

Implemented in netflex::parsing::header_fields_parser, netflex::parsing::header_field_parser, netflex::parsing::start_line_parser, netflex::parsing::message_body_parser, netflex::parsing::message_body_content_length_parser, netflex::parsing::message_body_chuncked_parser, netflex::parsing::message_body_compress_parser, netflex::parsing::message_body_deflate_parser, and netflex::parsing::message_body_gzip_parser.

Member Data Documentation

◆ m_request

http::request& netflex::parsing::parser_iface::m_request
protected

request


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