allow for Goal subclasses to provide copy operations, while prohibiting direct copy

This commit is contained in:
Fischlurch 2009-11-15 16:28:42 +01:00
parent 09c0cacee2
commit 7d6fa03c51

View file

@ -50,6 +50,14 @@ namespace session {
using std::tr1::function; using std::tr1::function;
using std::string; 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 Goal;
class Resolution; class Resolution;
@ -58,15 +66,15 @@ namespace session {
/** Allow for taking ownership of a result set */ /** Allow for taking ownership of a result set */
typedef std::tr1::shared_ptr<Resolution> PReso; typedef std::tr1::shared_ptr<Resolution> PReso;
/** /**
* TODO type comment * TODO type comment
* Query ABC * Query ABC
*/ */
class Goal class Goal
: noncopyable : no_copy_by_client
{ {
public: public:
virtual ~Goal() ; virtual ~Goal() ;