blob: cad722f6f42b829d5c9f92ea5a86c2ad7f5d2c21 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@google.comac10a2d2010-12-22 21:39:39 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * 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.comac10a2d2010-12-22 21:39:39 +00007 */
8
9
epoger@google.comec3ed6a2011-07-28 14:26:00 +000010
reed@google.comac10a2d2010-12-22 21:39:39 +000011#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.com91826102011-03-21 19:51:57 +000020class GR_API GrNoncopyable {
reed@google.comac10a2d2010-12-22 21:39:39 +000021public:
22 GrNoncopyable() {}
23
24private:
25 // illegal
26 GrNoncopyable(const GrNoncopyable&);
27 GrNoncopyable& operator=(const GrNoncopyable&);
28};
29
30#endif
31