WebFramework v3.0.12
Web framework for C++.
Loading...
Searching...
No Matches
framework Namespace Reference

Classes

class  BaseExecutor
 Base class for all executors. More...
 
class  BaseHeavyOperationStatefulExecutor
 Base class for executors with dynamically changes states. More...
 
class  BaseHeavyOperationStatelessExecutor
 Base class for executors with constant or static states. More...
 
class  BaseStatefulExecutor
 Base class for executors with dynamically changes states. More...
 
class  BaseStatelessExecutor
 Base class for executors with constant or static states. More...
 
class  BaseWebServer
 
class  ExecutorsManager
 
class  HTTPRequest
 Parsing HTTP request. More...
 
class  HTTPResponse
 HTTPBuilder wrapper. More...
 
class  MultithreadedWebServer
 
class  ResourceExecutor
 Used for sending asset files. More...
 
class  SessionsManager
 
class  ThreadPoolWebServer
 
class  WebFramework
 Main class of framework. More...
 
class  WebFrameworkDynamicPages
 

Typedefs

using createExecutorFunction = void* (*)()
 

Functions

string print (const vector< string > &arguments)
 
string include (const vector< string > &arguments, const string &pathToTemplates)
 
string forWFDP (const vector< string > &arguments, const unordered_map< string, function< string(const vector< string > &)> > &dynamicPagesFunctions)
 
std::string print (const std::vector< std::string > &arguments)
 Print data to .wfdp file.
 
std::string include (const std::vector< std::string > &arguments, const std::string &pathToTemplates)
 Include another file.
 
std::string forWFDP (const std::vector< std::string > &arguments, const std::unordered_map< std::string, std::function< std::string(const std::vector< std::string > &)> > &dynamicPagesFunctions)
 For cycle.
 
streams::IOSocketStream & operator>> (streams::IOSocketStream &stream, HTTPRequest &request)
 
ostream & operator<< (ostream &stream, const HTTPRequest &request)
 
streams::IOSocketStream & operator<< (streams::IOSocketStream &stream, HTTPResponse &response)
 

Detailed Description

Executors is classes that can process specific request from clients For example following link send request to "/test" path http://127.0.0.1/test You can create and configure your class that would be processing this path Base class for all executors

Typedef Documentation

◆ createExecutorFunction

using framework::createExecutorFunction = void* (*)()

Definition at line 129 of file BaseExecutor.h.

Function Documentation

◆ forWFDP() [1/2]

std::string framework::forWFDP ( const std::vector< std::string > & arguments,
const std::unordered_map< std::string, std::function< std::string(const std::vector< std::string > &)> ,
& dynamicPagesFunctions )

For cycle.

Parameters
argumentsarguments[0] - start index, arguments[1] - index after end, arguments[2] - function name, arguments[3] - cycle step(optional parameter)
Returns
All data from function

◆ forWFDP() [2/2]

string framework::forWFDP ( const vector< string > & arguments,
const unordered_map< string, function< string(const vector< string > &)> ,
& dynamicPagesFunctions )

◆ include() [1/2]

std::string framework::include ( const std::vector< std::string > & arguments,
const std::string & pathToTemplates )

Include another file.

Parameters
argumentstake file name from arguments[0]
Returns
all data from another file
Exceptions
file_manager::exceptions::FileDoesNotExistException

◆ include() [2/2]

string framework::include ( const vector< string > & arguments,
const string & pathToTemplates )

◆ operator<<() [1/2]

ostream & framework::operator<< ( ostream & stream,
const HTTPRequest & request )

Definition at line 311 of file HTTPRequest.cpp.

◆ operator<<() [2/2]

streams::IOSocketStream & framework::operator<< ( streams::IOSocketStream & stream,
HTTPResponse & response )
Parameters
streamspecial class for sending data through network
responseclass instance
Returns
reference to self
Exceptions
web::WebException

Definition at line 98 of file HTTPResponse.cpp.

◆ operator>>()

streams::IOSocketStream & framework::operator>> ( streams::IOSocketStream & stream,
HTTPRequest & request )
Parameters
streamspecial class for taking data from network
requestclass instance
Returns
self for builder pattern
Exceptions
web::WebException

Definition at line 295 of file HTTPRequest.cpp.

◆ print() [1/2]

std::string framework::print ( const std::vector< std::string > & arguments)

Print data to .wfdp file.

Parameters
argumentsfor printing
Returns
arguments with spaces

◆ print() [2/2]

string framework::print ( const vector< string > & arguments)

Definition at line 9 of file StandardWebFrameworkDynamicPagesFunctions.cpp.