Web framework C++  2.0.0
Simple web framework on c++ designed to easily create web pages, etc
Public Member Functions | Protected Member Functions | List of all members
FormUrlEncoded Class Reference

Concrete template method pattern for parsing form encoded as application/x-www-form-urlencoded. More...

#include <form_urlencoded.h>

Inheritance diagram for FormUrlEncoded:
Inheritance graph
Collaboration diagram for FormUrlEncoded:
Collaboration graph

Public Member Functions

 FormUrlEncoded ()
 
- Public Member Functions inherited from FormParser
KeyEntityStorageparseForm (std::string &httpRequest, KeyValueStorage *KVPStorage=nullptr)
 
virtual ~FormParser ()
 

Protected Member Functions

void parseNextKey (size_t startPosition, size_t endPosition) override
 
void parseNextValue (size_t startPosition, size_t endPosition) override
 
- Protected Member Functions inherited from FormParser
void selectFormBody ()
 
virtual void actionBeforeSelectingBody ()
 
virtual void actionBeforeValueParsing (size_t keyStart, size_t keyEnd)
 
KeyValueStorage getKeyValuePairs ()
 
void setCurrentValue (FormEntity *valueCurrent)
 

Additional Inherited Members

- Protected Attributes inherited from FormParser
KeyEntityStoragevalues = nullptr
 
FormEntityvalueCurrent = nullptr
 
std::string keyCurrent
 
std::string formBody
 
std::string valuesDelimiter
 
std::string pairsDelimiter
 

Detailed Description

Concrete template method pattern for parsing form encoded as application/x-www-form-urlencoded.

This abstract class is intend to parse application/x-www-form-urlencoded html forms

Constructor & Destructor Documentation

FormUrlEncoded::FormUrlEncoded ( )

create concrete template method to parse application/x-www-form-urlencoded html forms

Member Function Documentation

void FormUrlEncoded::parseNextKey ( size_t  startPosition,
size_t  endPosition 
)
overrideprotectedvirtual

Parse key of form with application/x-www-form-urlencoded enctype

Parameters
startPositionstart position of key in form body
endPositionend position of key in form body, exclusive

Implements FormParser.

void FormUrlEncoded::parseNextValue ( size_t  startPosition,
size_t  endPosition 
)
overrideprotectedvirtual

Parse value of form with application/x-www-form-urlencoded enctype

Parameters
startPositionstart position of value in form body
endPositionend position of value in form body, exclusive

Implements FormParser.


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