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

Namespaces

namespace  details

Classes

class  Block
 Base class for configuration blocks like 'server' and 'location'. More...
class  ConfigError
class  ConfigException
class  ConfigNode
 A generic node representing a block in the configuration file. More...
class  ConfigWarning
class  DirectiveHandler
class  Lexer
 A static utility class that performs lexical analysis on a config string. More...
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  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...
struct  Token
 Represents a single lexical token with a type and a literal value. More...
class  Validator
 Performs semantic validation on mapped configuration blocks. More...

Typedefs

typedef std::vector< std::string > StringVector
typedef std::map< std::string, StringVectorDirectiveMap
typedef std::vector< std::string > DirectiveArgs
typedef std::pair< std::string, DirectiveArgsDirectivePair
typedef std::vector< ConfigNodeConfigNodeVec
typedef enum config::TokenType TokenType
typedef struct config::Token Token
typedef std::vector< TokenTokenArray
typedef std::map< std::string, LocationBlockLocationBlockMap
typedef std::vector< ServerBlockServerBlockVec
typedef std::map< int, ServerBlockVecServerBlockMap

Enumerations

enum  TokenType {
  IDENTIFIER , STRING , NUMBER , ENDPOINT ,
  LEFT_BRACE , RIGHT_BRACE , SEMICOLON , UNKNOWN ,
  END_OF_FILE
}
 Represents the type of a lexical token. More...

Functions

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, ServerBlock const &t)
std::ostream & operator<< (std::ostream &o, ServerConfig const &t)

Typedef Documentation

◆ ConfigNodeVec

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

◆ DirectiveArgs

typedef std::vector<std::string> config::DirectiveArgs

◆ DirectiveMap

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

◆ DirectivePair

typedef std::pair<std::string, DirectiveArgs> config::DirectivePair

◆ LocationBlockMap

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

◆ ServerBlockMap

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

◆ ServerBlockVec

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

◆ StringVector

typedef std::vector<std::string> config::StringVector

◆ Token

typedef struct config::Token config::Token

◆ TokenArray

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

◆ TokenType

Enumeration Type Documentation

◆ 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

◆ issue_warning()

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

◆ operator<<() [1/5]

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

◆ operator<<() [2/5]

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

◆ operator<<() [3/5]

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

◆ operator<<() [4/5]

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

◆ operator<<() [5/5]

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