From ba2d4dc761ac14e08e44c97cc6c054c632ae057d Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 9 Aug 2009 03:38:44 +0200 Subject: [PATCH] a handle may also be activated by sharing ownership with a manager --- src/lib/handle.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/handle.hpp b/src/lib/handle.hpp index 12a8b4979..cb3b56e55 100644 --- a/src/lib/handle.hpp +++ b/src/lib/handle.hpp @@ -108,6 +108,15 @@ namespace lib { return *this; } + /** another way of activating a handle by sharing ownership + * with an existing smart-ptr */ + Handle& + activate(shared_ptr const& impl) + { + smPtr_ = impl; + return *this; + } + /** deactivate this handle, so it isn't tied any longer * to the associated implementation or service object. * When all handles have either been deactivated or