SkNoncopyable.h 737 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright 2006 The Android Open Source Project
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkNoncopyable_DEFINED
  8. #define SkNoncopyable_DEFINED
  9. #include "include/core/SkTypes.h"
  10. /** \class SkNoncopyable
  11. SkNoncopyable is the base class for objects that do not want to
  12. be copied. It hides its copy-constructor and its assignment-operator.
  13. */
  14. class SK_API SkNoncopyable {
  15. public:
  16. SkNoncopyable() = default;
  17. SkNoncopyable(SkNoncopyable&&) = default;
  18. SkNoncopyable& operator =(SkNoncopyable&&) = default;
  19. private:
  20. SkNoncopyable(const SkNoncopyable&) = delete;
  21. SkNoncopyable& operator=(const SkNoncopyable&) = delete;
  22. };
  23. #endif