@@ -61,10 +61,10 @@ class BasicJsonSessionInvokeAdapter {
6161 class StatefulRegistrationBuilder {
6262 public:
6363 StatefulRegistrationBuilder (
64- BasicJsonSessionInvokeAdapter& adapter ,
64+ BasicJsonSessionInvokeAdapter& json_session_invoke_adapter ,
6565 std::string configured_object_type_name,
6666 ObjectOptions options)
67- : adapter_(adapter )
67+ : json_session_invoke_adapter_(json_session_invoke_adapter )
6868 , configured_object_type_name_(std::move(configured_object_type_name))
6969 , options_(std::move(options))
7070 {
@@ -74,7 +74,7 @@ class BasicJsonSessionInvokeAdapter {
7474 StatefulRegistrationBuilder& operator =(const StatefulRegistrationBuilder&) = delete ;
7575
7676 StatefulRegistrationBuilder (StatefulRegistrationBuilder&& other) noexcept
77- : adapter_ (other.adapter_ )
77+ : json_session_invoke_adapter_ (other.json_session_invoke_adapter_ )
7878 , configured_object_type_name_(std::move(other.configured_object_type_name_))
7979 , options_(std::move(other.options_))
8080 , created_(other.created_)
@@ -304,7 +304,8 @@ class BasicJsonSessionInvokeAdapter {
304304 {
305305 return registerDestroyWithMetadata (
306306 destroy_tool_name,
307- BasicJsonSessionInvokeAdapter::makeDestroyMetadata (adapter_.defaultDestroyDescription ()),
307+ BasicJsonSessionInvokeAdapter::makeDestroyMetadata (
308+ json_session_invoke_adapter_.defaultDestroyDescription ()),
308309 scheduling_scope);
309310 }
310311
@@ -369,7 +370,7 @@ class BasicJsonSessionInvokeAdapter {
369370 func_registry::FunctionMetadata metadata,
370371 ToolSchedulingScope scheduling_scope)
371372 {
372- adapter_ .template registerFactory <T>(
373+ json_session_invoke_adapter_ .template registerFactory <T>(
373374 factory_tool_name,
374375 std::forward<Fn>(fn),
375376 std::move (metadata),
@@ -388,7 +389,7 @@ class BasicJsonSessionInvokeAdapter {
388389 ToolSchedulingScope scheduling_scope)
389390 {
390391 validateMethodType<Fn>();
391- adapter_ .template registerStatefulMethod <T>(
392+ json_session_invoke_adapter_ .template registerStatefulMethod <T>(
392393 method_tool_name,
393394 std::forward<Fn>(fn),
394395 std::move (metadata),
@@ -401,21 +402,25 @@ class BasicJsonSessionInvokeAdapter {
401402 func_registry::FunctionMetadata metadata,
402403 ToolSchedulingScope scheduling_scope)
403404 {
404- adapter_.template registerDestroy <T>(destroy_tool_name, std::move (metadata), scheduling_scope);
405+ json_session_invoke_adapter_.template registerDestroy <T>(
406+ destroy_tool_name,
407+ std::move (metadata),
408+ scheduling_scope);
405409 destroy_registered_ = true ;
406410 return *this ;
407411 }
408412
409413 void ensureDefaultDestroyRegistered () noexcept
410414 {
411- if (!active_ || !created_ || destroy_registered_ || !adapter_.stateful_defaults_ .auto_register_destroy )
415+ if (!active_ || !created_ || destroy_registered_
416+ || !json_session_invoke_adapter_.stateful_defaults_ .auto_register_destroy )
412417 {
413418 return ;
414419 }
415420
416421 destroy_registered_ = true ;
417422 const std::string destroy_tool_name = defaultDestroyToolName ();
418- if (adapter_ .isFunctionRegistered (destroy_tool_name))
423+ if (json_session_invoke_adapter_ .isFunctionRegistered (destroy_tool_name))
419424 {
420425 return ;
421426 }
@@ -424,7 +429,8 @@ class BasicJsonSessionInvokeAdapter {
424429 {
425430 registerDestroyWithMetadata (
426431 destroy_tool_name,
427- BasicJsonSessionInvokeAdapter::makeDestroyMetadata (adapter_.defaultDestroyDescription ()),
432+ BasicJsonSessionInvokeAdapter::makeDestroyMetadata (
433+ json_session_invoke_adapter_.defaultDestroyDescription ()),
428434 ToolSchedulingScope::object_lane);
429435 }
430436 catch (...)
@@ -458,7 +464,7 @@ class BasicJsonSessionInvokeAdapter {
458464 return BasicJsonSessionInvokeAdapter::defaultDestroyToolName (configured_object_type_name_);
459465 }
460466
461- BasicJsonSessionInvokeAdapter& adapter_ ;
467+ BasicJsonSessionInvokeAdapter& json_session_invoke_adapter_ ;
462468 std::string configured_object_type_name_;
463469 ObjectOptions options_;
464470 bool created_{false };
0 commit comments