File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -472,6 +472,21 @@ class RequestorContext {
472472 */
473473 std::shared_ptr<const ParserConfig> config () const ;
474474
475+ /* *
476+ * @brief Return this context's shared runtime services.
477+ *
478+ * The returned owner keeps the HTTP client, resource cache, and volatile catalog
479+ * holders alive. Hosts that construct a @ref CatalogManager for the same parser
480+ * session pass this handle to it, so a successful catalog apply updates the
481+ * mirrors and selectors observed by contexts derived from this one.
482+ * @return The immutable shared-services handle used by this context.
483+ * @note The @ref ServiceState object's holder members are intentionally mutable
484+ * synchronization points; callers must not replace the service bundle.
485+ */
486+ [[nodiscard]] std::shared_ptr<const ServiceState> services () const noexcept {
487+ return services_;
488+ }
489+
475490 /* *
476491 * @brief Shared cache of compiled parser resources (CSS selector sets,
477492 * regexes, ...), keyed by resource-set type.
@@ -636,4 +651,4 @@ class RequestorContext {
636651 // / services carry no mirror holder (every parser falls back to its built-ins).
637652 std::shared_ptr<const MirrorSource> mirror_snapshot_;
638653};
639- } // namespace aniparse
654+ } // namespace aniparse
You can’t perform that action at this time.
0 commit comments