epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2010 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 10 | |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 11 | #ifndef GrNoncopyable_DEFINED |
| 12 | #define GrNoncopyable_DEFINED |
| 13 | |
| 14 | #include "GrTypes.h" |
| 15 | |
| 16 | /** |
| 17 | * Base for classes that want to disallow copying themselves. It makes its |
| 18 | * copy-constructor and assignment operators private (and unimplemented). |
| 19 | */ |
bsalomon@google.com | 9182610 | 2011-03-21 19:51:57 +0000 | [diff] [blame] | 20 | class GR_API GrNoncopyable { |
reed@google.com | ac10a2d | 2010-12-22 21:39:39 +0000 | [diff] [blame] | 21 | public: |
| 22 | GrNoncopyable() {} |
| 23 | |
| 24 | private: |
| 25 | // illegal |
| 26 | GrNoncopyable(const GrNoncopyable&); |
| 27 | GrNoncopyable& operator=(const GrNoncopyable&); |
| 28 | }; |
| 29 | |
| 30 | #endif |
| 31 | |