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
37 lines (27 loc) · 830 Bytes
/
ServerApplicationsTree.h
File metadata and controls
37 lines (27 loc) · 830 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
35
36
37
#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();
~ServerApplicationsTree();
inline bool empty() const
{
return list.empty();
}
void addApplication(const std::string &, ServerApplicationSettings *);
void addApplication(std::vector<std::string> &, ServerApplicationSettings *);
ServerApplicationSettings *find(const std::string &) const;
ServerApplicationSettings *find(std::vector<std::string> &) const;
void collectApplicationSettings(std::unordered_set<ServerApplicationSettings *> &) const;
void clear();
};
};