A base class for (non-Singleton) objects which shouldn't be copied. More...
#include "non-copyable.h"
Protected Member Functions | |
NonCopyable () | |
Constructor. More... | |
~NonCopyable () | |
Destructor. More... | |
Private Member Functions | |
NonCopyable (const NonCopyable &) | |
Copy constructor. More... | |
NonCopyable & | operator= (const NonCopyable &other) |
Assignment. More... | |
A base class for (non-Singleton) objects which shouldn't be copied.
To prevent copying of your class ExampleNC
just inherit from NonCopyable:
This class prevents each instance of a derived class from being copied. If you want only a single global instance of the derived class, see Singleton.
boost::noncopyable
. Definition at line 54 of file non-copyable.h.
|
inlineprotected |
Constructor.
Definition at line 58 of file non-copyable.h.
|
inlineprotected |
Destructor.
Definition at line 60 of file non-copyable.h.
|
private |
Copy constructor.
Private, so not copyable.
|
private |
Assignment.
Private, so not copyable.
[in] | other | The dummy argument |