From 2bffd0d304a477dddb0a1c22271dc8e4a863b352 Mon Sep 17 00:00:00 2001 From: Fabian Reister <fabian.reister@kit.edu> Date: Thu, 27 May 2021 09:55:01 +0200 Subject: [PATCH] updated class description. thanks, @RainerKartmann --- source/RobotAPI/components/ArViz/Client/ScopedClient.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/RobotAPI/components/ArViz/Client/ScopedClient.h b/source/RobotAPI/components/ArViz/Client/ScopedClient.h index a6c52c3f2..23271b5ba 100644 --- a/source/RobotAPI/components/ArViz/Client/ScopedClient.h +++ b/source/RobotAPI/components/ArViz/Client/ScopedClient.h @@ -26,7 +26,15 @@ namespace armarx::viz { /** - * @brief viz::Client that will cleanup layers when destroyed. + * @brief `viz::Client` that will delete (clear) committed layers when destroyed. + * + * Note that, as a consequence, a network call be performed in the destructor. + * + * This might be useful if you have a class `MyTask` perform visualizing while performing some task, + * but whose visualization should be removed when the task finished. + * In this case, `MyTask` can have a `viz::ScopedClient` (which can be created from a regular `viz::Client`). + * When destructing the instance of `MyTask`, all visualization done by `MyTask` will be cleared + * (as `viz::ScopedClient` will go out of scope as well). * */ class ScopedClient: virtual public Client -- GitLab