|
nginxconfig
C++libraryforparsingandprintingnginx.conf
|
#include <nginxconfig/ast.hpp>
Public Member Functions | |
| ast_entry (const ast_entry &) = default | |
| ast_entry & | operator= (const ast_entry &) = default |
| ast_entry (ast_entry &&) noexcept | |
| ast_entry & | operator= (ast_entry &&) noexcept |
| ast_entry_kind | kind () const |
| const std::string & | name () const |
| std::string & | name () |
| const attribute_list & | attributes () const |
| attribute_list & | attributes () |
| const child_list & | children () const |
| child_list & | children () |
| const std::string & | comment () const |
| std::string & | comment () |
| bool | operator== (const ast_entry &other) const |
| bool | operator!= (const ast_entry &other) const |
Static Public Member Functions | |
| static ast_entry | make_simple (std::string name, attribute_list attributes=attribute_list(), std::string comment_text=std::string()) |
| static ast_entry | make_complex (std::string name, attribute_list attributes=attribute_list(), child_list children=child_list()) |
| static ast_entry | make_document (child_list children=child_list()) |
| static ast_entry | make_comment (std::string comment_text) |
Friends | |
| void | swap (ast_entry &a, ast_entry &b) noexcept |
| const ast_entry::attribute_list & nginxconfig::ast_entry::attributes | ( | ) | const |
The attributes immediately follow the name of a simple or complex entry. This is used to specify additional options to an entry.
| kind_error | if kind is not simple or complex. |
| const ast_entry::child_list & nginxconfig::ast_entry::children | ( | ) | const |
Get the children of a complex or document entry.
| kind_error | if kind is not complex or document. |
| const std::string & nginxconfig::ast_entry::comment | ( | ) | const |
Get the comment of a comment, simple or complex entry. Comments are appended after the closing ; or {. For document comments, add them as a child.
| kind_error | if kind is not comment, simple or complex. |
| ast_entry_kind nginxconfig::ast_entry::kind | ( | ) | const |
| ast_entry nginxconfig::ast_entry::make_comment | ( | std::string | comment_text | ) | [static] |
| ast_entry nginxconfig::ast_entry::make_complex | ( | std::string | name, |
| attribute_list | attributes = attribute_list(), |
||
| child_list | children = child_list() |
||
| ) | [static] |
| ast_entry nginxconfig::ast_entry::make_document | ( | child_list | children = child_list() | ) | [static] |
| ast_entry nginxconfig::ast_entry::make_simple | ( | std::string | name, |
| attribute_list | attributes = attribute_list(), |
||
| std::string | comment_text = std::string() |
||
| ) | [static] |
| const std::string & nginxconfig::ast_entry::name | ( | ) | const |
The name of the entry is the first part of a simple or complex entry. This is typically something like "http", "location" or "root". The only allowed characters according to nginx are alphanumeric and underscores, but your input is not validated.
| kind_error | if kind is not simple or complex. |
| bool nginxconfig::ast_entry::operator== | ( | const ast_entry & | other | ) | const |