|
Webserv
|
Defines the contract for a configuration directive handler. More...
#include <IDirective.hpp>
Public Member Functions | |
| virtual | ~IDirective () |
| Virtual destructor. | |
| virtual void | process (Block &block, ParsedDirectiveArgs const &args) const =0 |
| The primary logic for processing the directive's arguments. | |
| virtual std::string const & | getName () const =0 |
| Gets the name of the directive. | |
Defines the contract for a configuration directive handler.
This interface uses the Strategy Pattern to encapsulate the logic for processing a specific directive (e.g., 'listen', 'root') from the configuration file. Each concrete directive class will implement this interface to handle its specific syntax and validation.
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Gets the name of the directive.
Implemented in config::AliasDirective, config::AllowMethodsDirective, config::AutoIndexDirective, config::CgiPassDirective, config::ClientMaxBodySize, config::ErrorPageDirective, config::IndexDirective, config::ListenDirective, config::ReturnDirective, config::RootDirective, config::ServerNameDirective, and config::UploadPathDirective.
|
pure virtual |
The primary logic for processing the directive's arguments.
| block | The configuration block (ServerBlock or LocationBlock) to modify. |
| args | The vector of string arguments for the directive. |
Implemented in config::AliasDirective, config::AllowMethodsDirective, config::AutoIndexDirective, config::CgiPassDirective, config::ClientMaxBodySize, config::ErrorPageDirective, config::IndexDirective, config::ListenDirective, config::ReturnDirective, config::RootDirective, config::ServerNameDirective, and config::UploadPathDirective.