Crow  1.1
A C++ microframework for the web
Loading...
Searching...
No Matches
crow::Blueprint Class Reference

A blueprint can be considered a smaller section of a Crow app, specifically where the router is concerned. More...

#include <routing.h>

Public Member Functions

 Blueprint (const std::string &prefix)
 Blueprint (const std::string &prefix, const std::string &static_dir)
 Blueprint (const std::string &prefix, const std::string &static_dir, const std::string &templates_dir)
 Blueprint (Blueprint &&value)
Blueprint & operator= (const Blueprint &value)=delete
Blueprint & operator= (Blueprint &&value) noexcept
bool operator== (const Blueprint &value)
bool operator!= (const Blueprint &value)
std::string prefix () const
std::string static_dir () const
void set_added ()
bool is_added ()
DynamicRule & new_rule_dynamic (const std::string &rule)
template<uint64_t N>
black_magic::arguments< N >::type::template rebind< TaggedRule > & new_rule_tagged (const std::string &rule)
void register_blueprint (Blueprint &blueprint)
CatchallRule & catchall_rule ()
template<typename App, typename... Middlewares>
void middlewares ()

Friends

class Router

Detailed Description

A blueprint can be considered a smaller section of a Crow app, specifically where the router is concerned.

You can use blueprints to assign a common prefix to rules' prefix, set custom static and template folders, and set a custom catchall route. You can also assign nest blueprints for maximum Compartmentalization.


The documentation for this class was generated from the following file: