Use named_parameter_t from Seafire::Server

This commit is contained in:
R.Y.A.N 2025-03-09 15:56:08 +01:00
parent 669a54a17b
commit 8bacfde0c1
Signed by: R.Y.A.N
GPG Key ID: 3BD93EABD1407B82
2 changed files with 6 additions and 16 deletions

View File

@ -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
{ {

View File

@ -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
{ {