A search tree.
More...
|
| Trie () |
|
bool | is_empty () |
| Check whether or not the trie is empty. More...
|
|
void | optimize () |
|
void | debug_print () |
|
void | validate () |
|
std::tuple< uint16_t, std::vector< uint16_t >, routing_params > | find (const std::string &req_url, const Node *node=nullptr, unsigned pos=0, routing_params *params=nullptr, std::vector< uint16_t > *blueprints=nullptr) const |
|
void | add (const std::string &url, uint16_t rule_index, unsigned bp_prefix_length=0, uint16_t blueprint_index=INVALID_BP_ID) |
|
size_t | get_size () |
|
size_t | get_size (Node *node) |
|
◆ Trie()
◆ is_empty()
bool crow::Trie::is_empty |
( |
| ) |
|
|
inline |
Check whether or not the trie is empty.
◆ optimize()
void crow::Trie::optimize |
( |
| ) |
|
|
inline |
◆ optimizeNode()
void crow::Trie::optimizeNode |
( |
Node * |
node | ) |
|
|
inlineprivate |
◆ debug_node_print()
void crow::Trie::debug_node_print |
( |
Node * |
node, |
|
|
int |
level |
|
) |
| |
|
inlineprivate |
◆ debug_print()
void crow::Trie::debug_print |
( |
| ) |
|
|
inline |
◆ validate()
void crow::Trie::validate |
( |
| ) |
|
|
inline |
◆ find()
std::tuple<uint16_t, std::vector<uint16_t>, routing_params> crow::Trie::find |
( |
const std::string & |
req_url, |
|
|
const Node * |
node = nullptr , |
|
|
unsigned |
pos = 0 , |
|
|
routing_params * |
params = nullptr , |
|
|
std::vector< uint16_t > * |
blueprints = nullptr |
|
) |
| const |
|
inline |
◆ add()
void crow::Trie::add |
( |
const std::string & |
url, |
|
|
uint16_t |
rule_index, |
|
|
unsigned |
bp_prefix_length = 0 , |
|
|
uint16_t |
blueprint_index = INVALID_BP_ID |
|
) |
| |
|
inline |
◆ get_size() [1/2]
size_t crow::Trie::get_size |
( |
| ) |
|
|
inline |
◆ get_size() [2/2]
size_t crow::Trie::get_size |
( |
Node * |
node | ) |
|
|
inline |
◆ new_node()
Node* crow::Trie::new_node |
( |
Node * |
parent | ) |
|
|
inlineprivate |
◆ head_
The documentation for this class was generated from the following file: