Webserv
Loading...
Searching...
No Matches
ConfigNode.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <map>
5#include <string>
6
7namespace config {
8
9class ConfigNode;
10
11typedef std::vector<std::string> DirectiveArgs;
12typedef std::map<std::string, DirectiveArgs> DirectiveMap;
13typedef std::pair<std::string, DirectiveArgs> DirectivePair;
14typedef std::vector<ConfigNode> ConfigNodeVec;
15
25public:
27 args.reserve(3);
28 };
29 ConfigNode(std::string const &conf_name) : name(conf_name) {
30 args.reserve(3);
31 };
32 std::string name;
36};
37
38} // namespace config
A generic node representing a block in the configuration file.
Definition ConfigNode.hpp:24
std::string name
Definition ConfigNode.hpp:32
DirectiveArgs args
Definition ConfigNode.hpp:33
ConfigNode(std::string const &conf_name)
Definition ConfigNode.hpp:29
ConfigNodeVec children
Definition ConfigNode.hpp:35
DirectiveMap directives
Definition ConfigNode.hpp:34
ConfigNode()
Definition ConfigNode.hpp:26
Definition ConfigException.hpp:6
std::vector< ConfigNode > ConfigNodeVec
Definition ConfigNode.hpp:14
std::vector< std::string > DirectiveArgs
Definition ConfigNode.hpp:11
std::pair< std::string, DirectiveArgs > DirectivePair
Definition ConfigNode.hpp:13
std::map< std::string, StringVector > DirectiveMap
Definition Block.hpp:10