NetFlex  0.0.0
C++11 HTTP Server Library.
Public Member Functions | List of all members
netflex::parsing::header_field_parser Class Reference

#include <header_field_parser.hpp>

Inheritance diagram for netflex::parsing::header_field_parser:
netflex::parsing::parser_iface

Public Member Functions

 header_field_parser (http::request &request)
 
 ~header_field_parser (void)=default
 
 header_field_parser (const header_field_parser &)=delete
 copy ctor
 
header_field_parseroperator= (const header_field_parser &)=delete
 assignment operator
 
void reset (void)
 
parser_ifaceoperator<< (std::string &data)
 
bool is_done (void) const
 
- Public Member Functions inherited from netflex::parsing::parser_iface
 parser_iface (http::request &request)
 
virtual ~parser_iface (void)=default
 default dtor
 

Additional Inherited Members

- Protected Attributes inherited from netflex::parsing::parser_iface
http::requestm_request
 

Detailed Description

parser for a single header field

Constructor & Destructor Documentation

◆ header_field_parser()

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

default ctor

Parameters
requestrequest to be initialized

◆ ~header_field_parser()

netflex::parsing::header_field_parser::~header_field_parser ( void  )
default

default dtor

Member Function Documentation

◆ is_done()

bool netflex::parsing::header_field_parser::is_done ( void  ) const
virtual
Returns
whether the parsing is done or not

Implements netflex::parsing::parser_iface.

◆ operator<<()

parser_iface& netflex::parsing::header_field_parser::operator<< ( std::string &  data)
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

Implements netflex::parsing::parser_iface.

◆ reset()

void netflex::parsing::header_field_parser::reset ( void  )

reset state of parsing (startover again)


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