Browse Source

GL: document copyability/movability explicitly in all classes.

In particular, the AbstractTexture and AbstractQuery subclasses didn't
have that. I can't remember the rules about noexcept (and the users even
less), so let's make that explicit.
pull/255/head
Vladimír Vondruš 8 years ago
parent
commit
b1acabcda1
  1. 12
      src/Magnum/GL/BufferTexture.h
  2. 12
      src/Magnum/GL/CubeMapTexture.h
  3. 12
      src/Magnum/GL/CubeMapTextureArray.h
  4. 12
      src/Magnum/GL/PrimitiveQuery.h
  5. 12
      src/Magnum/GL/RectangleTexture.h
  6. 12
      src/Magnum/GL/SampleQuery.h
  7. 12
      src/Magnum/GL/Texture.h
  8. 12
      src/Magnum/GL/TextureArray.h
  9. 12
      src/Magnum/GL/TimeQuery.h

12
src/Magnum/GL/BufferTexture.h

@ -145,6 +145,18 @@ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture {
*/
explicit BufferTexture(NoCreateT) noexcept: AbstractTexture{NoCreate, GL_TEXTURE_BUFFER} {}
/** @brief Copying is not allowed */
BufferTexture(const BufferTexture&) = delete;
/** @brief Move constructor */
BufferTexture(BufferTexture&&) noexcept = default;
/** @brief Copying is not allowed */
BufferTexture& operator=(const BufferTexture&) = delete;
/** @brief Move assignment */
BufferTexture& operator=(BufferTexture&&) noexcept = default;
/**
* @brief Bind texture to given image unit
* @param imageUnit Image unit

12
src/Magnum/GL/CubeMapTexture.h

@ -176,6 +176,18 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture {
*/
explicit CubeMapTexture(NoCreateT) noexcept: AbstractTexture{NoCreate, GL_TEXTURE_CUBE_MAP} {}
/** @brief Copying is not allowed */
CubeMapTexture(const CubeMapTexture&) = delete;
/** @brief Move constructor */
CubeMapTexture(CubeMapTexture&&) noexcept = default;
/** @brief Copying is not allowed */
CubeMapTexture& operator=(const CubeMapTexture&) = delete;
/** @brief Move assignment */
CubeMapTexture& operator=(CubeMapTexture&&) noexcept = default;
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/**
* @brief Bind level of given cube map texture coordinate to given image unit

12
src/Magnum/GL/CubeMapTextureArray.h

@ -155,6 +155,18 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture {
*/
explicit CubeMapTextureArray(NoCreateT) noexcept: AbstractTexture{NoCreate, GL_TEXTURE_CUBE_MAP_ARRAY} {}
/** @brief Copying is not allowed */
CubeMapTextureArray(const CubeMapTextureArray&) = delete;
/** @brief Move constructor */
CubeMapTextureArray(CubeMapTextureArray&&) noexcept = default;
/** @brief Copying is not allowed */
CubeMapTextureArray& operator=(const CubeMapTextureArray&) = delete;
/** @brief Move assignment */
CubeMapTextureArray& operator=(CubeMapTextureArray&&) noexcept = default;
/**
* @brief Bind level of given texture layer to given image unit
* @param imageUnit Image unit

12
src/Magnum/GL/PrimitiveQuery.h

@ -151,6 +151,18 @@ class MAGNUM_GL_EXPORT PrimitiveQuery: public AbstractQuery {
*/
explicit PrimitiveQuery(NoCreateT) noexcept: AbstractQuery{NoCreate, GLenum(Target::TransformFeedbackPrimitivesWritten)} {}
/** @brief Copying is not allowed */
PrimitiveQuery(const PrimitiveQuery&) = delete;
/** @brief Move constructor */
PrimitiveQuery(PrimitiveQuery&&) noexcept = default;
/** @brief Copying is not allowed */
PrimitiveQuery& operator=(const PrimitiveQuery&) = delete;
/** @brief Move assignment */
PrimitiveQuery& operator=(PrimitiveQuery&&) noexcept = default;
/**
* @brief Begin query
*

12
src/Magnum/GL/RectangleTexture.h

@ -137,6 +137,18 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture {
*/
explicit RectangleTexture(NoCreateT) noexcept: AbstractTexture{NoCreate, GL_TEXTURE_RECTANGLE} {}
/** @brief Copying is not allowed */
RectangleTexture(const RectangleTexture&) = delete;
/** @brief Move constructor */
RectangleTexture(RectangleTexture&&) noexcept = default;
/** @brief Copying is not allowed */
RectangleTexture& operator=(const RectangleTexture&) = delete;
/** @brief Move assignment */
RectangleTexture& operator=(RectangleTexture&&) noexcept = default;
/**
* @brief Bind texture to given image unit
* @param imageUnit Image unit

12
src/Magnum/GL/SampleQuery.h

@ -208,6 +208,18 @@ class SampleQuery: public AbstractQuery {
*/
explicit SampleQuery(NoCreateT) noexcept: AbstractQuery{NoCreate, GLenum(Target::AnySamplesPassed)} {}
/** @brief Copying is not allowed */
SampleQuery(const SampleQuery&) = delete;
/** @brief Move constructor */
SampleQuery(SampleQuery&&) noexcept = default;
/** @brief Copying is not allowed */
SampleQuery& operator=(const SampleQuery&) = delete;
/** @brief Move assignment */
SampleQuery& operator=(SampleQuery&&) noexcept = default;
#ifndef MAGNUM_TARGET_GLES
/**
* @brief Begin conditional rendering based on result value

12
src/Magnum/GL/Texture.h

@ -189,6 +189,18 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
*/
explicit Texture(NoCreateT) noexcept: AbstractTexture{NoCreate, Implementation::textureTarget<dimensions>()} {}
/** @brief Copying is not allowed */
Texture(const Texture<dimensions>&) = delete;
/** @brief Move constructor */
Texture(Texture<dimensions>&&) noexcept = default;
/** @brief Copying is not allowed */
Texture<dimensions>& operator=(const Texture<dimensions>&) = delete;
/** @brief Move assignment */
Texture<dimensions>& operator=(Texture<dimensions>&&) noexcept = default;
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/**
* @brief Bind level of texture to given image unit

12
src/Magnum/GL/TextureArray.h

@ -173,6 +173,18 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
*/
explicit TextureArray(NoCreateT) noexcept: AbstractTexture{NoCreate, Implementation::textureArrayTarget<dimensions>()} {}
/** @brief Copying is not allowed */
TextureArray(const TextureArray<dimensions>&) = delete;
/** @brief Move constructor */
TextureArray(TextureArray<dimensions>&&) noexcept = default;
/** @brief Copying is not allowed */
TextureArray<dimensions>& operator=(const TextureArray<dimensions>&) = delete;
/** @brief Move assignment */
TextureArray<dimensions>& operator=(TextureArray<dimensions>&&) noexcept = default;
#ifndef MAGNUM_TARGET_WEBGL
/**
* @brief Bind level of given texture layer to given image unit

12
src/Magnum/GL/TimeQuery.h

@ -128,6 +128,18 @@ class TimeQuery: public AbstractQuery {
*/
explicit TimeQuery(NoCreateT) noexcept: AbstractQuery{NoCreate, GLenum(Target::TimeElapsed)} {}
/** @brief Copying is not allowed */
TimeQuery(const TimeQuery&) = delete;
/** @brief Move constructor */
TimeQuery(TimeQuery&&) noexcept = default;
/** @brief Copying is not allowed */
TimeQuery& operator=(const TimeQuery&) = delete;
/** @brief Move assignment */
TimeQuery& operator=(TimeQuery&&) noexcept = default;
/* Overloads to remove WTF-factor from method chaining order */
#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(MAGNUM_TARGET_WEBGL)
TimeQuery& setLabel(const std::string& label) {

Loading…
Cancel
Save