Update copy/move constructors/operators

Former-commit-id: b1faeeae9211a6c0ca29261d46929dc8c66ea0c4
This commit is contained in:
Lynix
2015-09-24 12:51:52 +02:00
parent dea3fb4e39
commit c214251ecf
24 changed files with 89 additions and 19 deletions

View File

@@ -24,12 +24,17 @@ class NAZARA_GRAPHICS_API NzAbstractBackground : public NzRefCounted
{
public:
NzAbstractBackground() = default;
NzAbstractBackground(const NzAbstractBackground&) = default;
NzAbstractBackground(NzAbstractBackground&&) = delete;
virtual ~NzAbstractBackground();
virtual void Draw(const NzAbstractViewer* viewer) const = 0;
virtual nzBackgroundType GetBackgroundType() const = 0;
NzAbstractBackground& operator=(const NzAbstractBackground&) = default;
NzAbstractBackground& operator=(NzAbstractBackground&&) = delete;
private:
static NzBackgroundLibrary::LibraryMap s_library;
};

View File

@@ -21,6 +21,8 @@ class NAZARA_GRAPHICS_API NzAbstractViewer
{
public:
NzAbstractViewer() = default;
NzAbstractViewer(const NzAbstractViewer&) = default;
NzAbstractViewer(NzAbstractViewer&&) noexcept = default;
virtual ~NzAbstractViewer();
virtual void ApplyView() const = 0;
@@ -35,6 +37,9 @@ class NAZARA_GRAPHICS_API NzAbstractViewer
virtual const NzRecti& GetViewport() const = 0;
virtual float GetZFar() const = 0;
virtual float GetZNear() const = 0;
NzAbstractViewer& operator=(const NzAbstractViewer&) = default;
NzAbstractViewer& operator=(NzAbstractViewer&&) noexcept = default;
};
#endif // NAZARA_ABSTRACTVIEWER_HPP

View File

@@ -24,6 +24,7 @@ class NAZARA_GRAPHICS_API NzBillboard : public NzInstancedRenderable
inline NzBillboard(NzMaterialRef material);
inline NzBillboard(NzTexture* texture);
inline NzBillboard(const NzBillboard& billboard);
NzBillboard(NzBillboard&&) = delete;
~NzBillboard() = default;
void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const InstanceData& instanceData) const override;
@@ -42,6 +43,7 @@ class NAZARA_GRAPHICS_API NzBillboard : public NzInstancedRenderable
inline void SetTexture(NzTextureRef texture, bool resizeBillboard = true);
inline NzBillboard& operator=(const NzBillboard& billboard);
NzBillboard& operator=(NzBillboard&&) = delete;
template<typename... Args> static NzBillboardRef New(Args&&... args);

View File

@@ -21,6 +21,8 @@ class NAZARA_GRAPHICS_API NzColorBackground : public NzAbstractBackground
{
public:
NzColorBackground(const NzColor& color = NzColor::Black);
NzColorBackground(const NzColorBackground&) = default;
NzColorBackground(NzColorBackground&&) = delete;
void Draw(const NzAbstractViewer* viewer) const;
@@ -29,6 +31,8 @@ class NAZARA_GRAPHICS_API NzColorBackground : public NzAbstractBackground
void SetColor(const NzColor& color);
NzColorBackground& operator=(NzColorBackground&&) = delete;
template<typename... Args> static NzColorBackgroundRef New(Args&&... args);
private: