Webserv
Loading...
Searching...
No Matches
config Namespace Reference

Namespaces

namespace  details

Classes

class  AliasDirective
class  AllowMethodsDirective
class  ArgumentFactory
class  AutoIndexDirective
class  Block
 Base class for configuration blocks like 'server' and 'location'. More...
class  Bool
class  CgiPassDirective
class  ClientMaxBodySize
class  ConcatenatedValue
class  ConfigError
class  ConfigException
class  ConfigNode
 A generic node representing a block in the configuration file. More...
class  ConfigWarning
class  DirectiveHandler
class  ErrorPageDirective
class  IArgument
interface  IDirective
 Defines the contract for a configuration directive handler. More...
class  IndexDirective
class  Integer
class  Lexer
 A static utility class that performs lexical analysis on a config string. More...
class  ListenDirective
class  LocationBlock
 Represents a single 'location' block from the configuration file. More...
class  Mapper
 Translates a generic ConfigNode tree into strongly-typed config blocks. More...
class  Parser
 Performs syntax analysis on a stream of tokens to build a configuration tree. More...
class  ReturnDirective
class  RootDirective
class  ServerBlock
 Represents a single 'server' block from the configuration file. More...
class  ServerConfig
 A strongly-typed data container for a server block's configuration. More...
class  ServerNameDirective
class  String
struct  Token
 Represents a single lexical token with a type and a literal value. More...
class  UploadPathDirective
class  Validator
 Performs semantic validation on mapped configuration blocks. More...
class  ValidatorUtils
 Static utility class for common configuration validation tasks. More...
class  Variable

Typedefs

typedef enum config::TokenType TokenType
typedef struct config::Token Token
typedef std::vector< TokenParsedDirectiveArgs
typedef std::map< std::string, ParsedDirectiveArgsParsedDirectiveMap
typedef std::pair< std::string, ParsedDirectiveArgsParsedDirectivePair
typedef std::vector< ConfigNodeConfigNodeVec
typedef IArgumentArgumentPtr
typedef std::vector< ArgumentPtrArgumentVector
typedef std::map< std::string, ArgumentVectorDirectiveMap
typedef std::vector< TokenTokenArray
typedef std::map< std::string, LocationBlockLocationBlockMap
typedef std::vector< ServerBlockServerBlockVec
typedef std::map< int, ServerBlockVecServerBlockMap
typedef std::string(* FuncVar) (http::Request const &req)
typedef std::map< std::string, FuncVarFuncMap

Enumerations

enum  ArgumentType {
  ARG_STRING , ARG_INTEGER , ARG_VARIABLE , ARG_CONCATENATED ,
  ARG_BOOL
}
enum  TokenType {
  IDENTIFIER , STRING , NUMBER , ENDPOINT ,
  LEFT_BRACE , RIGHT_BRACE , SEMICOLON , UNKNOWN ,
  END_OF_FILE
}
 Represents the type of a lexical token. More...

Functions

char const * getArgumentTypeName (ArgumentType)
void issue_warning (const std::string &msg)
std::ostream & operator<< (std::ostream &o, Token const &t)
std::ostream & operator<< (std::ostream &o, TokenType const t)
std::ostream & operator<< (std::ostream &o, LocationBlock const &t)
std::ostream & operator<< (std::ostream &o, ServerConfig const &t)
bool isValidVariableChar (char c)
size_t getVariableLength (std::string const &s, size_t pos)
FuncMap const & getMap ()
std::string HostFunc (http::Request const &req)
std::ostream & operator<< (std::ostream &o, Block const &b)
std::ostream & operator<< (std::ostream &o, const ServerBlock &t)

Typedef Documentation

◆ ArgumentPtr

◆ ArgumentVector

typedef std::vector<ArgumentPtr> config::ArgumentVector

◆ ConfigNodeVec

typedef std::vector<ConfigNode> config::ConfigNodeVec

◆ DirectiveMap

typedef std::map<std::string, ArgumentVector> config::DirectiveMap

◆ FuncMap

typedef std::map<std::string, FuncVar> config::FuncMap

◆ FuncVar

typedef std::string(* config::FuncVar) (http::Request const &req)

◆ LocationBlockMap

typedef std::map<std::string, LocationBlock> config::LocationBlockMap

◆ ParsedDirectiveArgs

typedef std::vector<Token> config::ParsedDirectiveArgs

◆ ParsedDirectiveMap

typedef std::map<std::string, ParsedDirectiveArgs> config::ParsedDirectiveMap

◆ ParsedDirectivePair

typedef std::pair<std::string, ParsedDirectiveArgs> config::ParsedDirectivePair

◆ ServerBlockMap

typedef std::map<int, ServerBlockVec> config::ServerBlockMap

◆ ServerBlockVec

typedef std::vector<ServerBlock> config::ServerBlockVec

◆ Token

typedef struct config::Token config::Token

◆ TokenArray

typedef std::vector<Token> config::TokenArray

◆ TokenType

Enumeration Type Documentation

◆ ArgumentType

Enumerator
ARG_STRING 
ARG_INTEGER 
ARG_VARIABLE 
ARG_CONCATENATED 
ARG_BOOL 

◆ TokenType

Represents the type of a lexical token.

Enumerator
IDENTIFIER 

A keyword or variable name, e.g., "server_name".

STRING 

A quoted string literal, e.g., "hello world".

NUMBER 

A numeric literal, e.g., 8080.

ENDPOINT 

A special token type, perhaps for future use.

LEFT_BRACE 

The '{' character.

RIGHT_BRACE 

The '}' character.

SEMICOLON 

The ';' character.

UNKNOWN 

A token that could not be identified.

END_OF_FILE 

A special token representing the end of the input.

Function Documentation

◆ getArgumentTypeName()

char const * config::getArgumentTypeName ( ArgumentType type)

◆ getMap()

FuncMap const & config::getMap ( )

◆ getVariableLength()

size_t config::getVariableLength ( std::string const & s,
size_t pos )

◆ HostFunc()

std::string config::HostFunc ( http::Request const & req)

◆ issue_warning()

void config::issue_warning ( const std::string & msg)

◆ isValidVariableChar()

bool config::isValidVariableChar ( char c)

◆ operator<<() [1/6]

std::ostream & config::operator<< ( std::ostream & o,
Block const & b )

◆ operator<<() [2/6]

std::ostream & config::operator<< ( std::ostream & o,
const ServerBlock & t )

◆ operator<<() [3/6]

std::ostream & config::operator<< ( std::ostream & o,
LocationBlock const & t )

◆ operator<<() [4/6]

std::ostream & config::operator<< ( std::ostream & o,
ServerConfig const & t )

◆ operator<<() [5/6]

std::ostream & config::operator<< ( std::ostream & o,
Token const & t )

◆ operator<<() [6/6]

std::ostream & config::operator<< ( std::ostream & o,
TokenType const t )