From 7d6fa03c5140de8aceb50c1b12a0164889dbc9da Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 15 Nov 2009 16:28:42 +0100 Subject: [PATCH] allow for Goal subclasses to provide copy operations, while prohibiting direct copy --- src/proc/mobject/session/query-resolver.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/proc/mobject/session/query-resolver.hpp b/src/proc/mobject/session/query-resolver.hpp index 62a8980d4..59562dd60 100644 --- a/src/proc/mobject/session/query-resolver.hpp +++ b/src/proc/mobject/session/query-resolver.hpp @@ -50,6 +50,14 @@ namespace session { using std::tr1::function; using std::string; + class no_copy_by_client + { + protected: + ~no_copy_by_client() {} + no_copy_by_client() {} + no_copy_by_client (no_copy_by_client const&) {} + const no_copy_by_client& operator=(no_copy_by_client const&) {} + }; class Goal; class Resolution; @@ -58,15 +66,15 @@ namespace session { /** Allow for taking ownership of a result set */ typedef std::tr1::shared_ptr PReso; - - + + /** * TODO type comment * Query ABC */ class Goal - : noncopyable + : no_copy_by_client { public: virtual ~Goal() ;