38 lines
652 B
C++
38 lines
652 B
C++
#include <seafire/routing/endpoint.hxx>
|
|
|
|
namespace seafire::routing
|
|
{
|
|
|
|
endpoint_t::
|
|
endpoint_t(std::string pattern, server::request_handler_t handler)
|
|
: pattern_{std::move(pattern)}, handler_{std::move(handler)}
|
|
{}
|
|
|
|
std::string const&
|
|
endpoint_t::
|
|
pattern() const
|
|
{
|
|
return pattern_;
|
|
}
|
|
|
|
server::request_handler_t const&
|
|
endpoint_t::
|
|
handler() const
|
|
{
|
|
return handler_;
|
|
}
|
|
|
|
std::ostream&
|
|
to_stream(std::ostream& o, endpoint_t const& ep)
|
|
{
|
|
return o << ep.pattern();
|
|
}
|
|
|
|
std::ostream&
|
|
operator<<(std::ostream& o, endpoint_t const& ep)
|
|
{
|
|
return to_stream(o, ep);
|
|
}
|
|
|
|
} // namespace seafire::routing
|