2424#include < boost/core/bit.hpp>
2525#include < boost/core/ignore_unused.hpp>
2626#include < boost/rts/brotli/encode.hpp>
27- #include < boost/rts/context .hpp>
27+ #include < boost/rts/polystore .hpp>
2828#include < boost/rts/zlib/compression_method.hpp>
2929#include < boost/rts/zlib/compression_strategy.hpp>
3030#include < boost/rts/zlib/deflate.hpp>
@@ -94,13 +94,13 @@ class zlib_filter
9494
9595public:
9696 zlib_filter (
97- const rts::context & ctx,
97+ const rts::polystore & ctx,
9898 http_proto::detail::workspace& ws,
9999 int comp_level,
100100 int window_bits,
101101 int mem_level)
102102 : zlib_filter_base(ws)
103- , svc_(ctx.get_service <rts::zlib::deflate_service>())
103+ , svc_(ctx.get <rts::zlib::deflate_service>())
104104 {
105105 system::error_code ec = static_cast <rts::zlib::error>(svc_.init2 (
106106 strm_,
@@ -160,11 +160,11 @@ class brotli_filter
160160
161161public:
162162 brotli_filter (
163- const rts::context & ctx,
163+ const rts::polystore & ctx,
164164 http_proto::detail::workspace&,
165165 std::uint32_t comp_quality,
166166 std::uint32_t comp_window)
167- : svc_(ctx.get_service <rts::brotli::encode_service>())
167+ : svc_(ctx.get <rts::brotli::encode_service>())
168168 {
169169 // TODO: use custom allocator
170170 state_ = svc_.create_instance (nullptr , nullptr , nullptr );
@@ -231,14 +231,12 @@ clamp(
231231}
232232
233233class serializer_service
234- : public rts::service
235234{
236235public:
237236 serializer::config cfg;
238237 std::size_t space_needed = 0 ;
239238
240239 serializer_service (
241- const rts::context&,
242240 serializer::config const & cfg_)
243241 : cfg(cfg_)
244242 {
@@ -269,10 +267,10 @@ class serializer_service
269267
270268void
271269install_serializer_service (
272- rts::context & ctx,
270+ rts::polystore & ctx,
273271 serializer::config const & cfg)
274272{
275- ctx.make_service <serializer_service>(cfg);
273+ ctx.emplace <serializer_service>(cfg);
276274}
277275
278276// ------------------------------------------------
@@ -297,7 +295,7 @@ class serializer::impl
297295 stream
298296 };
299297
300- const rts::context & ctx_;
298+ const rts::polystore & ctx_;
301299 serializer_service& svc_;
302300 detail::workspace ws_;
303301
@@ -319,9 +317,9 @@ class serializer::impl
319317 bool filter_done_ = false ;
320318
321319public:
322- impl (const rts::context & ctx)
320+ impl (const rts::polystore & ctx)
323321 : ctx_(ctx)
324- , svc_(ctx_.get_service <serializer_service>())
322+ , svc_(ctx_.get <serializer_service>())
325323 , ws_(svc_.space_needed)
326324 {
327325 }
@@ -957,7 +955,7 @@ operator=(serializer&& other) noexcept
957955}
958956
959957serializer::
960- serializer (rts::context const & ctx)
958+ serializer (rts::polystore & ctx)
961959 : impl_(new impl(ctx))
962960{
963961 // TODO: use a single allocation for
0 commit comments