Use named_parameter_t from Seafire::Server
This commit is contained in:
parent
669a54a17b
commit
8bacfde0c1
@ -16,23 +16,18 @@ namespace seafire::routing
|
|||||||
typename ParameterType = server::string_parameter_t
|
typename ParameterType = server::string_parameter_t
|
||||||
>
|
>
|
||||||
class host_parameter_t
|
class host_parameter_t
|
||||||
|
: public server::named_parameter_t<Name>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using parameter_type = ParameterType;
|
using parameter_type = ParameterType;
|
||||||
using value_type = typename parameter_type::value_type;
|
using value_type = typename parameter_type::value_type;
|
||||||
|
|
||||||
static
|
|
||||||
std::string const&
|
|
||||||
name()
|
|
||||||
{
|
|
||||||
static std::string const name{Name};
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
host_parameter_t(std::optional<value_type> value)
|
host_parameter_t(std::optional<value_type> value)
|
||||||
: _value{std::move(value)}
|
: _value{std::move(value)}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
using server::named_parameter_t<Name>::name;
|
||||||
|
|
||||||
std::optional<value_type> const&
|
std::optional<value_type> const&
|
||||||
value() const
|
value() const
|
||||||
{
|
{
|
||||||
|
@ -16,23 +16,18 @@ namespace seafire::routing
|
|||||||
typename ParameterType = server::string_parameter_t
|
typename ParameterType = server::string_parameter_t
|
||||||
>
|
>
|
||||||
class route_parameter_t
|
class route_parameter_t
|
||||||
|
: public server::named_parameter_t<Name>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using parameter_type = ParameterType;
|
using parameter_type = ParameterType;
|
||||||
using value_type = typename parameter_type::value_type;
|
using value_type = typename parameter_type::value_type;
|
||||||
|
|
||||||
static
|
|
||||||
std::string const&
|
|
||||||
name()
|
|
||||||
{
|
|
||||||
static std::string const name{Name};
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
route_parameter_t(std::optional<value_type> value)
|
route_parameter_t(std::optional<value_type> value)
|
||||||
: _value{std::move(value)}
|
: _value{std::move(value)}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
using server::named_parameter_t<Name>::name;
|
||||||
|
|
||||||
std::optional<value_type> const&
|
std::optional<value_type> const&
|
||||||
value() const
|
value() const
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user