I'm fairly inexperienced with C++ and I keep seeing this pattern in the header files of the graphics library wrappers within the code base that I'm trying to learn from; could somebody explain to me what the first eight lines in the 'public' section are doing?
Full code:
#pragma once
#include <glad/glad.h>
#include "textures.h"
namespace gl {
class Framebuffer final {
public:
Framebuffer();
~Framebuffer();
Framebuffer(Framebuffer&& other);
Framebuffer& operator=(Framebuffer&& other);
Framebuffer(const Framebuffer&) = delete;
Framebuffer& operator=(const Framebuffer&) = delete;
void create(unsigned int width, unsigned int height);
void destroy();
void bind() const;
void bindTexture() const;
private:
void reset();
Texture2d m_texture;
GLuint m_handle = 0;
GLuint m_renderbufferHandle = 0;
unsigned m_width = 0;
unsigned m_height = 0;
};
void unbindFramebuffers(unsigned windowWidth, unsigned windowHeight);
}
The lines I'm curious about:
namespace gl {
class Framebuffer final {
public:
Framebuffer();
~Framebuffer();
Framebuffer(Framebuffer&& other);
Framebuffer& operator=(Framebuffer&& other);
Framebuffer(const Framebuffer&) = delete;
Framebuffer& operator=(const Framebuffer&) = delete;
Including these lines causes my build to fail with an unresolved external symbol error, however removing them also causes the build to fail for different unresolved symbol reasons. I assume it's trying to add, overwrite, or extend something in the 'gl' namespace? But I'm not sure about the specifics of what it's trying to accomplish are.