diff options
Diffstat (limited to 'include/gpu/GrNoncopyable.h')
-rw-r--r-- | include/gpu/GrNoncopyable.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/gpu/GrNoncopyable.h b/include/gpu/GrNoncopyable.h new file mode 100644 index 0000000..cad722f --- /dev/null +++ b/include/gpu/GrNoncopyable.h @@ -0,0 +1,31 @@ + +/* + * Copyright 2010 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + + + +#ifndef GrNoncopyable_DEFINED +#define GrNoncopyable_DEFINED + +#include "GrTypes.h" + +/** + * Base for classes that want to disallow copying themselves. It makes its + * copy-constructor and assignment operators private (and unimplemented). + */ +class GR_API GrNoncopyable { +public: + GrNoncopyable() {} + +private: + // illegal + GrNoncopyable(const GrNoncopyable&); + GrNoncopyable& operator=(const GrNoncopyable&); +}; + +#endif + |