Webserv
Loading...
Searching...
No Matches
config::LocationBlock Class Reference

Represents a single 'location' block from the configuration file. More...

#include <LocationBlock.hpp>

Inheritance diagram for config::LocationBlock:
config::Block

Public Member Functions

std::string const & getPath () const
void setPath (std::string const &)
StringVector const * getIndexFiles () const
bool hasCgiPass () const
Public Member Functions inherited from config::Block
virtual ~Block ()
bool has (std::string const &key) const
 Checks if a directive exists within the block.
StringVector const * operator[] (std::string const &key) const
StringVectoroperator[] (std::string const &key)
void add (std::string const &key, StringVector const &values)
void add (std::string const &key, std::string const &value)
DirectiveMap const & getDirectives () const
 Provides read-only access to the underlying directive map.
DirectiveMapgetDirectives ()
 Provides read-write access to the underlying directive map.
StringVector const * get (std::string const &key) const
 Retrieves the arguments for a specific directive.
std::string getRoot () const
 A convenient, strongly-typed accessor for the 'root' directive.
void setRoot (std::string const &root)

Private Attributes

std::string path_

Additional Inherited Members

Protected Attributes inherited from config::Block
DirectiveMap directives_

Detailed Description

Represents a single 'location' block from the configuration file.

This class is a strongly-typed container for the directives defined within a location context. It holds settings such as the document root and index files for a specific URI path.

Member Function Documentation

◆ getIndexFiles()

StringVector const * config::LocationBlock::getIndexFiles ( ) const

◆ getPath()

std::string const & config::LocationBlock::getPath ( ) const

◆ hasCgiPass()

bool config::LocationBlock::hasCgiPass ( ) const

◆ setPath()

void config::LocationBlock::setPath ( std::string const & v)

Member Data Documentation

◆ path_

std::string config::LocationBlock::path_
private

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