Document deleted ctors/assignment operators

This commit is contained in:
Dmitry Marakasov 2015-01-11 00:34:47 +03:00
parent 8f8c5e2bf1
commit d714070984
12 changed files with 235 additions and 25 deletions

View File

@ -231,9 +231,21 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
AudioDevice& operator=(AudioDevice&& other) noexcept; AudioDevice& operator=(AudioDevice&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
AudioDevice(const AudioDevice& other) = delete; /// \brief Deleted copy constructor
AudioDevice& operator=(const AudioDevice& other) = delete; ///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
AudioDevice(const AudioDevice&) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
AudioDevice& operator=(const AudioDevice&) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get container audio device ID /// \brief Get container audio device ID

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -86,8 +86,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
AudioSpec& operator=(AudioSpec&& other); AudioSpec& operator=(AudioSpec&& other);
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
AudioSpec(const AudioSpec& other) = delete; AudioSpec(const AudioSpec& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
AudioSpec& operator=(const AudioSpec& other) = delete; AudioSpec& operator=(const AudioSpec& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -105,8 +105,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Font& operator=(Font&& other) noexcept; Font& operator=(Font&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Font(const Font&) = delete; Font(const Font&) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Font& operator=(const Font&) = delete; Font& operator=(const Font&) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -239,8 +239,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
RWops& operator=(RWops&& other) noexcept; RWops& operator=(RWops&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
RWops(const RWops&) = delete; RWops(const RWops&) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
RWops& operator=(const RWops&) = delete; RWops& operator=(const RWops&) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -101,8 +101,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Renderer& operator=(Renderer&& other) noexcept; Renderer& operator=(Renderer&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Renderer(const Renderer& other) = delete; Renderer(const Renderer& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Renderer& operator=(const Renderer& other) = delete; Renderer& operator=(const Renderer& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -75,10 +75,36 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~SDL(); virtual ~SDL();
// Deleted copy/move constructors and assignments ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDL(const SDL& other) = delete; SDL(const SDL& other) = delete;
SDL(SDL&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDL& operator=(const SDL& other) = delete; SDL& operator=(const SDL& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move constructor
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDL(SDL&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move assignment operator
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDL& operator=(SDL&& other) = delete; SDL& operator=(SDL&& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -94,10 +94,36 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
int GetInitFlags(); int GetInitFlags();
// Deleted copy/move constructors and assignments ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDLImage(const SDLImage& other) = delete; SDLImage(const SDLImage& other) = delete;
SDLImage(SDLImage&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDLImage& operator=(const SDLImage& other) = delete; SDLImage& operator=(const SDLImage& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move constructor
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDLImage(SDLImage&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move assignment operator
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDLImage& operator=(SDLImage&& other) = delete; SDLImage& operator=(SDLImage&& other) = delete;
}; };

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -70,10 +70,36 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~SDLTTF(); virtual ~SDLTTF();
// Deleted copy/move constructors and assignments ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDLTTF(const SDLTTF& other) = delete; SDLTTF(const SDLTTF& other) = delete;
SDLTTF(SDLTTF&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
SDLTTF& operator=(const SDLTTF& other) = delete; SDLTTF& operator=(const SDLTTF& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move constructor
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDLTTF(SDLTTF&& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted move assignment operator
///
/// This class is not movable
///
////////////////////////////////////////////////////////////
SDLTTF& operator=(SDLTTF&& other) = delete; SDLTTF& operator=(SDLTTF&& other) = delete;
}; };

View File

@ -119,8 +119,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
LockHandle& operator=(LockHandle&& other) noexcept; LockHandle& operator=(LockHandle&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
LockHandle(const LockHandle& other) = delete; LockHandle(const LockHandle& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
LockHandle& operator=(const LockHandle& other) = delete; LockHandle& operator=(const LockHandle& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -241,8 +253,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Surface& operator=(Surface&& other) noexcept; Surface& operator=(Surface&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Surface(const Surface&) = delete; Surface(const Surface&) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Surface& operator=(const Surface&) = delete; Surface& operator=(const Surface&) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -149,8 +149,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
LockHandle& operator=(LockHandle&& other) noexcept; LockHandle& operator=(LockHandle&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
LockHandle(const LockHandle& other) = delete; LockHandle(const LockHandle& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
LockHandle& operator=(const LockHandle& other) = delete; LockHandle& operator=(const LockHandle& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -259,8 +271,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Texture& operator=(Texture&& other) noexcept; Texture& operator=(Texture&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Texture(const Texture& other) = delete; Texture(const Texture& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Texture& operator=(const Texture& other) = delete; Texture& operator=(const Texture& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -1,6 +1,6 @@
/* /*
libSDL2pp - C++11 bindings/wrapper for SDL2 libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru> Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -104,8 +104,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Wav& operator=(Wav&& other); Wav& operator=(Wav&& other);
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Wav(const Wav& other) = delete; Wav(const Wav& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Wav& operator=(const Wav& other) = delete; Wav& operator=(const Wav& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -115,8 +115,20 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Window& operator=(Window&& other) noexcept; Window& operator=(Window&& other) noexcept;
// Deleted copy constructor and assignment ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Window(const Window& other) = delete; Window(const Window& other) = delete;
////////////////////////////////////////////////////////////
/// \brief Deleted assignment operator
///
/// This class is not copyable
///
////////////////////////////////////////////////////////////
Window& operator=(const Window& other) = delete; Window& operator=(const Window& other) = delete;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////