Crow  1.1
A C++ microframework for the web
crow::Blueprint Class Reference

A blueprint can be considered a smaller section of a Crow app, specifically where the router is conecerned. 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)
 
Blueprintoperator= (const Blueprint &value)=delete
 
Blueprintoperator= (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 ()
 
DynamicRulenew_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)
 
CatchallRulecatchall_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 conecerned.

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: