# Crow: crow::DynamicRule Class Reference

crow::DynamicRule Class Reference

A rule that can change its parameters during runtime. More...

`#include <routing.h>`

Inheritance diagram for crow::DynamicRule:

## Public Member Functions

| DynamicRule (std::string rule)
void | validate () override
void | handle (const request &req, response &res, const routing_params &params) override
template<typename Func >
void | operator() (Func f)
template<typename Func , unsigned ... Indices>
std::function< void(const request &, response &, const routing_params &)> | wrap (Func f, black_magic::seq< Indices... >)
template<typename Func >
void | operator() (std::string name, Func &&f)
Public Member Functions inherited from crow::BaseRule
| BaseRule (std::string rule)
virtual void | validate ()=0
std::unique_ptr< BaseRule > | upgrade ()
virtual void | handle (const request &, response &, const routing_params &)=0
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< DynamicRule >
WebSocketRule & | websocket ()
self_t & | name (std::string name) noexcept
self_t & | methods (HTTPMethod method)
self_t & | methods (HTTPMethod method, MethodArgs ... args_method)

## Additional Inherited Members

Public Types inherited from crow::RuleParameterTraits< DynamicRule >
using | self_t = DynamicRule
Protected Attributes inherited from crow::BaseRule
uint32_t | methods_ {1<<static_cast<int>(HTTPMethod::Get)}
std::string | rule_
std::string | name_
std::unique_ptr< BaseRule > | rule_to_upgrade_

## Detailed Description

A rule that can change its parameters during runtime.

## Member Function Documentation

## handle()

void crow::DynamicRule::handle | ( | const request & | req,
|  | response & | res,
|  | const routing_params & | params
| ) |  |

inlineoverridevirtual

Implements crow::BaseRule.

## validate()

void crow::DynamicRule::validate | ( |  | ) |

inlineoverridevirtual

Implements crow::BaseRule.

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

- /home/farook/cppsrv/crow-0.3-fordoc/include/crow/routing.h