forked from awwit/httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerApplicationsTree.h
More file actions
34 lines (24 loc) · 878 Bytes
/
ServerApplicationsTree.h
File metadata and controls
34 lines (24 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "ServerApplicationSettings.h"
namespace HttpServer
{
class ServerApplicationsTree
{
protected:
std::unordered_map<std::string, ServerApplicationsTree *> list;
ServerApplicationSettings *app_sets;
public:
ServerApplicationsTree() noexcept;
~ServerApplicationsTree() noexcept;
bool empty() const noexcept;
void addApplication(const std::string &name, ServerApplicationSettings *sets);
void addApplication(std::vector<std::string> &nameParts, ServerApplicationSettings *sets);
const ServerApplicationSettings *find(const std::string &name) const;
const ServerApplicationSettings *find(std::vector<std::string> &nameParts) const;
void collectApplicationSettings(std::unordered_set<ServerApplicationSettings *> &set) const;
void clear() noexcept;
};
};