Crow  0.3
A C++ microframework for the web
crow::TaggedRule< Args > Class Template Reference

Default rule created when CROW_ROUTE is called. More...

#include <routing.h>

Inheritance diagram for crow::TaggedRule< Args >:
crow::BaseRule crow::RuleParameterTraits< TaggedRule< Args... > >

Public Types

using self_t = TaggedRule< Args... >
 
- Public Types inherited from crow::RuleParameterTraits< TaggedRule< Args... > >
using self_t = TaggedRule< Args... >
 

Public Member Functions

 TaggedRule (std::string rule)
 
void validate () override
 
template<typename Func >
std::enable_if< black_magic::CallHelper< Func, black_magic::S< Args... > >::value, void >::type operator() (Func &&f)
 
template<typename Func >
std::enable_if< !black_magic::CallHelper< Func, black_magic::S< Args... > >::value &&black_magic::CallHelper< Func, black_magic::S< crow::request, Args... > >::value, void >::type operator() (Func &&f)
 
template<typename Func >
std::enable_if< !black_magic::CallHelper< Func, black_magic::S< Args... > >::value &&!black_magic::CallHelper< Func, black_magic::S< crow::request, Args... > >::value &&black_magic::CallHelper< Func, black_magic::S< crow::response &, Args... > >::value, void >::type operator() (Func &&f)
 
template<typename Func >
std::enable_if< !black_magic::CallHelper< Func, black_magic::S< Args... > >::value &&!black_magic::CallHelper< Func, black_magic::S< crow::request, Args... > >::value &&!black_magic::CallHelper< Func, black_magic::S< crow::response &, Args... > >::value, void >::type operator() (Func &&f)
 
template<typename Func >
void operator() (std::string name, Func &&f)
 
void handle (const request &req, response &res, const routing_params &params) override
 
- Public Member Functions inherited from crow::BaseRule
 BaseRule (std::string rule)
 
std::unique_ptr< BaseRuleupgrade ()
 
virtual void handle_upgrade (const request &, response &res, SocketAdaptor &&)
 
uint32_t get_methods ()
 
template<typename F >
void foreach_method (F f)
 
const std::string & rule ()
 
- Public Member Functions inherited from crow::RuleParameterTraits< TaggedRule< Args... > >
WebSocketRulewebsocket ()
 
self_tname (std::string name) noexcept
 
self_tmethods (HTTPMethod method)
 
self_tmethods (HTTPMethod method, MethodArgs ... args_method)
 

Additional Inherited Members

- Protected Attributes inherited from crow::BaseRule
uint32_t methods_ {1<<static_cast<int>(HTTPMethod::Get)}
 
std::string rule_
 
std::string name_
 
std::unique_ptr< BaseRulerule_to_upgrade_
 

Detailed Description

template<typename ... Args>
class crow::TaggedRule< Args >

Default rule created when CROW_ROUTE is called.


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