Core: Remove NonCopyable

Former-commit-id: f8c6d10ad0b1abb4a32e3c867b7f24fd4bde68a4
This commit is contained in:
Lynix 2015-09-24 00:37:21 +02:00
parent b16abf0d09
commit 2fd3872099
39 changed files with 205 additions and 112 deletions

View File

@ -8,7 +8,6 @@
#define NDK_WORLD_HPP #define NDK_WORLD_HPP
#include <Nazara/Core/Bitset.hpp> #include <Nazara/Core/Bitset.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <NDK/Entity.hpp> #include <NDK/Entity.hpp>
#include <NDK/EntityHandle.hpp> #include <NDK/EntityHandle.hpp>
#include <NDK/System.hpp> #include <NDK/System.hpp>
@ -19,7 +18,7 @@
namespace Ndk namespace Ndk
{ {
class NDK_API World : NzNonCopyable class NDK_API World
{ {
friend Entity; friend Entity;
@ -27,6 +26,8 @@ namespace Ndk
using EntityList = std::vector<EntityHandle>; using EntityList = std::vector<EntityHandle>;
inline World(bool addDefaultSystems = true); inline World(bool addDefaultSystems = true);
World(const World&) = delete;
World(World&&) = delete; ///TODO
~World(); ~World();
void AddDefaultSystems(); void AddDefaultSystems();
@ -60,6 +61,9 @@ namespace Ndk
void Update(); void Update();
inline void Update(float elapsedTime); inline void Update(float elapsedTime);
World& operator=(const World&) = delete;
World& operator=(World&&) = delete; ///TODO
private: private:
inline void Invalidate(); inline void Invalidate();
inline void Invalidate(EntityId id); inline void Invalidate(EntityId id);

View File

@ -27,12 +27,14 @@ using NzMusicLoader = NzResourceLoader<NzMusic, NzMusicParams>;
struct NzMusicImpl; struct NzMusicImpl;
class NAZARA_AUDIO_API NzMusic : public NzResource, public NzSoundEmitter, NzNonCopyable class NAZARA_AUDIO_API NzMusic : public NzResource, public NzSoundEmitter
{ {
friend NzMusicLoader; friend NzMusicLoader;
public: public:
NzMusic() = default; NzMusic() = default;
NzMusic(const NzMusic&) = delete;
NzMusic(NzMusic&&) = delete; ///TODO
~NzMusic(); ~NzMusic();
bool Create(NzSoundStream* soundStream); bool Create(NzSoundStream* soundStream);
@ -43,8 +45,8 @@ class NAZARA_AUDIO_API NzMusic : public NzResource, public NzSoundEmitter, NzNon
nzUInt32 GetDuration() const; nzUInt32 GetDuration() const;
nzAudioFormat GetFormat() const; nzAudioFormat GetFormat() const;
nzUInt32 GetPlayingOffset() const; nzUInt32 GetPlayingOffset() const;
unsigned int GetSampleCount() const; unsigned int GetSampleCount() const;
unsigned int GetSampleRate() const; unsigned int GetSampleRate() const;
nzSoundStatus GetStatus() const; nzSoundStatus GetStatus() const;
bool IsLooping() const; bool IsLooping() const;
@ -60,6 +62,9 @@ class NAZARA_AUDIO_API NzMusic : public NzResource, public NzSoundEmitter, NzNon
void Stop(); void Stop();
NzMusic& operator=(const NzMusic&) = delete;
NzMusic& operator=(NzMusic&&) = delete; ///TODO
private: private:
NzMusicImpl* m_impl = nullptr; NzMusicImpl* m_impl = nullptr;

View File

@ -11,7 +11,6 @@
#include <Nazara/Audio/Config.hpp> #include <Nazara/Audio/Config.hpp>
#include <Nazara/Audio/Enums.hpp> #include <Nazara/Audio/Enums.hpp>
#include <Nazara/Core/InputStream.hpp> #include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/RefCounted.hpp> #include <Nazara/Core/RefCounted.hpp>
@ -38,7 +37,7 @@ using NzSoundBufferRef = NzObjectRef<NzSoundBuffer>;
struct NzSoundBufferImpl; struct NzSoundBufferImpl;
class NAZARA_AUDIO_API NzSoundBuffer : public NzRefCounted, public NzResource, NzNonCopyable class NAZARA_AUDIO_API NzSoundBuffer : public NzRefCounted, public NzResource
{ {
friend NzSound; friend NzSound;
friend NzSoundBufferLibrary; friend NzSoundBufferLibrary;
@ -49,6 +48,8 @@ class NAZARA_AUDIO_API NzSoundBuffer : public NzRefCounted, public NzResource, N
public: public:
NzSoundBuffer() = default; NzSoundBuffer() = default;
NzSoundBuffer(nzAudioFormat format, unsigned int sampleCount, unsigned int sampleRate, const nzInt16* samples); NzSoundBuffer(nzAudioFormat format, unsigned int sampleCount, unsigned int sampleRate, const nzInt16* samples);
NzSoundBuffer(const NzSoundBuffer&) = delete;
NzSoundBuffer(NzSoundBuffer&&) = delete;
~NzSoundBuffer(); ~NzSoundBuffer();
bool Create(nzAudioFormat format, unsigned int sampleCount, unsigned int sampleRate, const nzInt16* samples); bool Create(nzAudioFormat format, unsigned int sampleCount, unsigned int sampleRate, const nzInt16* samples);
@ -69,6 +70,9 @@ class NAZARA_AUDIO_API NzSoundBuffer : public NzRefCounted, public NzResource, N
static bool IsFormatSupported(nzAudioFormat format); static bool IsFormatSupported(nzAudioFormat format);
template<typename... Args> static NzSoundBufferRef New(Args&&... args); template<typename... Args> static NzSoundBufferRef New(Args&&... args);
NzSoundBuffer& operator=(const NzSoundBuffer&) = delete;
NzSoundBuffer& operator=(NzSoundBuffer&&) = delete; ///TODO
// Signals: // Signals:
NazaraSignal(OnSoundBufferDestroy, const NzSoundBuffer* /*soundBuffer*/); NazaraSignal(OnSoundBufferDestroy, const NzSoundBuffer* /*soundBuffer*/);
NazaraSignal(OnSoundBufferRelease, const NzSoundBuffer* /*soundBuffer*/); NazaraSignal(OnSoundBufferRelease, const NzSoundBuffer* /*soundBuffer*/);

View File

@ -11,7 +11,6 @@
#include <Nazara/Audio/Config.hpp> #include <Nazara/Audio/Config.hpp>
#include <Nazara/Audio/Enums.hpp> #include <Nazara/Audio/Enums.hpp>
#include <Nazara/Core/InputStream.hpp> #include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Math/Vector3.hpp> #include <Nazara/Math/Vector3.hpp>
///TODO: Faire hériter SoundEmitter de Node ///TODO: Faire hériter SoundEmitter de Node
@ -51,9 +50,13 @@ class NAZARA_AUDIO_API NzSoundEmitter
virtual void Stop() = 0; virtual void Stop() = 0;
NzSoundEmitter& operator=(const NzSoundEmitter&) = delete; ///TODO
NzSoundEmitter& operator=(NzSoundEmitter&&) = delete; ///TODO
protected: protected:
NzSoundEmitter(); NzSoundEmitter();
NzSoundEmitter(const NzSoundEmitter& emitter); NzSoundEmitter(const NzSoundEmitter& emitter);
NzSoundEmitter(NzSoundEmitter&&) = delete; ///TODO
nzSoundStatus GetInternalStatus() const; nzSoundStatus GetInternalStatus() const;

View File

@ -61,7 +61,6 @@
#include <Nazara/Core/MemoryPool.hpp> #include <Nazara/Core/MemoryPool.hpp>
#include <Nazara/Core/MemoryStream.hpp> #include <Nazara/Core/MemoryStream.hpp>
#include <Nazara/Core/Mutex.hpp> #include <Nazara/Core/Mutex.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/OffsetOf.hpp> #include <Nazara/Core/OffsetOf.hpp>

View File

@ -8,19 +8,23 @@
#define NAZARA_ABSTRACTHASH_HPP #define NAZARA_ABSTRACTHASH_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NzHashDigest; class NzHashDigest;
class NAZARA_CORE_API NzAbstractHash : NzNonCopyable class NAZARA_CORE_API NzAbstractHash
{ {
public: public:
NzAbstractHash() = default; NzAbstractHash() = default;
NzAbstractHash(const NzAbstractHash&) = delete;
NzAbstractHash(NzAbstractHash&&) = default;
virtual ~NzAbstractHash(); virtual ~NzAbstractHash();
virtual void Append(const nzUInt8* data, unsigned int len) = 0; virtual void Append(const nzUInt8* data, unsigned int len) = 0;
virtual void Begin() = 0; virtual void Begin() = 0;
virtual NzHashDigest End() = 0; virtual NzHashDigest End() = 0;
NzAbstractHash& operator=(const NzAbstractHash&) = delete;
NzAbstractHash& operator=(NzAbstractHash&&) = default;
}; };
#endif // NAZARA_ABSTRACTHASH_HPP #endif // NAZARA_ABSTRACTHASH_HPP

View File

@ -8,20 +8,24 @@
#define NAZARA_CALLONEXIT_HPP #define NAZARA_CALLONEXIT_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <functional> #include <functional>
class NzCallOnExit : NzNonCopyable class NzCallOnExit
{ {
using Func = std::function<void()>; using Func = std::function<void()>;
public: public:
NzCallOnExit(Func func = nullptr); NzCallOnExit(Func func = nullptr);
NzCallOnExit(const NzCallOnExit&) = delete;
NzCallOnExit(NzCallOnExit&&) = delete;
~NzCallOnExit(); ~NzCallOnExit();
void CallAndReset(Func func = nullptr); void CallAndReset(Func func = nullptr);
void Reset(Func func = nullptr); void Reset(Func func = nullptr);
NzCallOnExit& operator=(const NzCallOnExit&) = delete;
NzCallOnExit& operator=(NzCallOnExit&&) = default;
private: private:
Func m_func; Func m_func;
}; };

View File

@ -8,15 +8,16 @@
#define NAZARA_CONDITIONVARIABLE_HPP #define NAZARA_CONDITIONVARIABLE_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NzConditionVariableImpl; class NzConditionVariableImpl;
class NzMutex; class NzMutex;
class NAZARA_CORE_API NzConditionVariable : NzNonCopyable class NAZARA_CORE_API NzConditionVariable
{ {
public: public:
NzConditionVariable(); NzConditionVariable();
NzConditionVariable(const NzConditionVariable&) = delete;
NzConditionVariable(NzConditionVariable&&) = delete; ///TODO
~NzConditionVariable(); ~NzConditionVariable();
void Signal(); void Signal();
@ -25,6 +26,9 @@ class NAZARA_CORE_API NzConditionVariable : NzNonCopyable
void Wait(NzMutex* mutex); void Wait(NzMutex* mutex);
bool Wait(NzMutex* mutex, nzUInt32 timeout); bool Wait(NzMutex* mutex, nzUInt32 timeout);
NzConditionVariable& operator=(const NzConditionVariable&) = delete;
NzConditionVariable& operator=(NzConditionVariable&&) = delete; ///TODO
private: private:
NzConditionVariableImpl* m_impl; NzConditionVariableImpl* m_impl;
}; };

View File

@ -8,7 +8,6 @@
#define NAZARA_DIRECTORY_HPP #define NAZARA_DIRECTORY_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#if defined(NAZARA_PLATFORM_WINDOWS) #if defined(NAZARA_PLATFORM_WINDOWS)
@ -28,11 +27,13 @@
class NzDirectoryImpl; class NzDirectoryImpl;
class NAZARA_CORE_API NzDirectory : NzNonCopyable class NAZARA_CORE_API NzDirectory
{ {
public: public:
NzDirectory(); NzDirectory();
NzDirectory(const NzString& dirPath); NzDirectory(const NzString& dirPath);
NzDirectory(const NzDirectory&) = delete;
NzDirectory(NzDirectory&&) = delete; ///TODO
~NzDirectory(); ~NzDirectory();
void Close(); void Close();
@ -63,6 +64,9 @@ class NAZARA_CORE_API NzDirectory : NzNonCopyable
static bool Remove(const NzString& dirPath, bool emptyDirectory = false); static bool Remove(const NzString& dirPath, bool emptyDirectory = false);
static bool SetCurrent(const NzString& dirPath); static bool SetCurrent(const NzString& dirPath);
NzDirectory& operator=(const NzDirectory&) = delete;
NzDirectory& operator=(NzDirectory&&) = delete; ///TODO
private: private:
NazaraMutexAttrib(m_mutex, mutable) NazaraMutexAttrib(m_mutex, mutable)

View File

@ -8,7 +8,6 @@
#define NAZARA_DYNLIB_HPP #define NAZARA_DYNLIB_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#if defined(NAZARA_PLATFORM_WINDOWS) #if defined(NAZARA_PLATFORM_WINDOWS)
@ -31,11 +30,12 @@ using NzDynLibFunc = int (*)(); // Type "générique" de pointeur sur fonction
class NzDynLibImpl; class NzDynLibImpl;
class NAZARA_CORE_API NzDynLib : NzNonCopyable class NAZARA_CORE_API NzDynLib
{ {
public: public:
NzDynLib(); NzDynLib();
NzDynLib(NzDynLib&& lib); NzDynLib(const NzDynLib&) = delete;
NzDynLib(NzDynLib&& lib);
~NzDynLib(); ~NzDynLib();
NzString GetLastError() const; NzString GetLastError() const;
@ -46,7 +46,8 @@ class NAZARA_CORE_API NzDynLib : NzNonCopyable
bool Load(const NzString& libraryPath); bool Load(const NzString& libraryPath);
void Unload(); void Unload();
NzDynLib& operator=(NzDynLib&& lib); NzDynLib& operator=(const NzDynLib&) = delete;
NzDynLib& operator=(NzDynLib&& lib);
private: private:
NazaraMutexAttrib(m_mutex, mutable) NazaraMutexAttrib(m_mutex, mutable)

View File

@ -9,18 +9,22 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Enums.hpp> #include <Nazara/Core/Enums.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NAZARA_CORE_API NzErrorFlags : NzNonCopyable class NAZARA_CORE_API NzErrorFlags
{ {
public: public:
NzErrorFlags(nzUInt32 flags, bool replace = false); NzErrorFlags(nzUInt32 flags, bool replace = false);
NzErrorFlags(const NzErrorFlags&) = delete;
NzErrorFlags(NzErrorFlags&&) = delete;
~NzErrorFlags(); ~NzErrorFlags();
nzUInt32 GetPreviousFlags() const; nzUInt32 GetPreviousFlags() const;
void SetFlags(nzUInt32 flags, bool replace = false); void SetFlags(nzUInt32 flags, bool replace = false);
NzErrorFlags& operator=(const NzErrorFlags&) = delete;
NzErrorFlags& operator=(NzErrorFlags&&) = delete;
private: private:
nzUInt32 m_previousFlags; nzUInt32 m_previousFlags;
}; };

View File

@ -14,7 +14,6 @@
#include <Nazara/Core/Hashable.hpp> #include <Nazara/Core/Hashable.hpp>
#include <Nazara/Core/HashDigest.hpp> #include <Nazara/Core/HashDigest.hpp>
#include <Nazara/Core/InputStream.hpp> #include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_FILE #if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_FILE
@ -27,13 +26,14 @@
class NzFileImpl; class NzFileImpl;
class NAZARA_CORE_API NzFile : public NzHashable, public NzInputStream, NzNonCopyable class NAZARA_CORE_API NzFile : public NzHashable, public NzInputStream
{ {
public: public:
NzFile(); NzFile();
NzFile(const NzString& filePath); NzFile(const NzString& filePath);
NzFile(const NzString& filePath, unsigned int openMode); NzFile(const NzString& filePath, unsigned int openMode);
NzFile(NzFile&& file) noexcept; NzFile(const NzFile&) = delete;
NzFile(NzFile&& file) noexcept;
~NzFile(); ~NzFile();
bool Copy(const NzString& newFilePath); bool Copy(const NzString& newFilePath);
@ -76,7 +76,8 @@ class NAZARA_CORE_API NzFile : public NzHashable, public NzInputStream, NzNonCop
bool Write(const NzString& string); bool Write(const NzString& string);
std::size_t Write(const void* buffer, std::size_t typeSize, unsigned int count); std::size_t Write(const void* buffer, std::size_t typeSize, unsigned int count);
NzFile& operator=(const NzString& filePath); NzFile& operator=(const NzString& filePath);
NzFile& operator=(const NzFile&) = delete;
NzFile& operator=(NzFile&& file) noexcept; NzFile& operator=(NzFile&& file) noexcept;
static NzString AbsolutePath(const NzString& filePath); static NzString AbsolutePath(const NzString& filePath);

View File

@ -11,17 +11,21 @@
#include <Nazara/Core/AbstractHash.hpp> #include <Nazara/Core/AbstractHash.hpp>
#include <Nazara/Core/Hashable.hpp> #include <Nazara/Core/Hashable.hpp>
#include <Nazara/Core/HashDigest.hpp> #include <Nazara/Core/HashDigest.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NAZARA_CORE_API NzHash : NzNonCopyable class NAZARA_CORE_API NzHash
{ {
public: public:
NzHash(nzHash hash); NzHash(nzHash hash);
NzHash(NzAbstractHash* hashImpl); NzHash(NzAbstractHash* hashImpl);
NzHash(const NzHash&) = delete;
NzHash(NzHash&&) = delete; ///TODO
~NzHash(); ~NzHash();
NzHashDigest Hash(const NzHashable& hashable); NzHashDigest Hash(const NzHashable& hashable);
NzHash& operator=(const NzHash&) = delete;
NzHash& operator=(NzHash&&) = delete; ///TODO
private: private:
NzAbstractHash* m_impl; NzAbstractHash* m_impl;
}; };

View File

@ -9,7 +9,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Error.hpp> #include <Nazara/Core/Error.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_LOG #if NAZARA_CORE_THREADSAFE && NAZARA_THREADSAFETY_LOG
@ -29,7 +28,7 @@
class NzFile; class NzFile;
class NAZARA_CORE_API NzLog : NzNonCopyable class NAZARA_CORE_API NzLog
{ {
public: public:
void Enable(bool enable); void Enable(bool enable);
@ -50,8 +49,13 @@ class NAZARA_CORE_API NzLog : NzNonCopyable
private: private:
NzLog(); NzLog();
NzLog(const NzLog&) = delete;
NzLog(NzLog&&) = delete;
~NzLog(); ~NzLog();
NzLog& operator=(const NzLog&) = delete;
NzLog& operator=(NzLog&&) = delete;
NazaraMutexAttrib(m_mutex, mutable) NazaraMutexAttrib(m_mutex, mutable)
NzString m_filePath; NzString m_filePath;

View File

@ -8,24 +8,26 @@
#define NAZARA_MUTEX_HPP #define NAZARA_MUTEX_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NzMutexImpl; class NzMutexImpl;
class NAZARA_CORE_API NzMutex : NzNonCopyable class NAZARA_CORE_API NzMutex
{ {
friend class NzConditionVariable; friend class NzConditionVariable;
public: public:
NzMutex(); NzMutex();
NzMutex(const NzMutex&) = delete;
NzMutex(NzMutex&&) = delete; ///TODO
~NzMutex(); ~NzMutex();
void Lock(); void Lock();
bool TryLock(); bool TryLock();
void Unlock(); void Unlock();
NzMutex& operator=(const NzMutex&) = delete;
NzMutex& operator=(NzMutex&&) = delete; ///TODO
private: private:
NzMutexImpl* m_impl; NzMutexImpl* m_impl;
}; };

View File

@ -1,20 +0,0 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_NONCOPYABLE_HPP
#define NAZARA_NONCOPYABLE_HPP
#include <Nazara/Prerequesites.hpp>
class NAZARA_CORE_API NzNonCopyable
{
protected:
NzNonCopyable() = default;
NzNonCopyable(const NzNonCopyable&) = delete;
NzNonCopyable& operator=(const NzNonCopyable&) = delete;
};
#endif // NAZARA_NONCOPYABLE_HPP

View File

@ -8,14 +8,15 @@
#define NAZARA_SEMAPHORE_HPP #define NAZARA_SEMAPHORE_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
class NzSemaphoreImpl; class NzSemaphoreImpl;
class NAZARA_CORE_API NzSemaphore : NzNonCopyable class NAZARA_CORE_API NzSemaphore
{ {
public: public:
NzSemaphore(unsigned int count); NzSemaphore(unsigned int count);
NzSemaphore(const NzSemaphore&) = delete;
NzSemaphore(NzSemaphore&&) = delete; ///TODO
~NzSemaphore(); ~NzSemaphore();
unsigned int GetCount() const; unsigned int GetCount() const;
@ -25,6 +26,9 @@ class NAZARA_CORE_API NzSemaphore : NzNonCopyable
void Wait(); void Wait();
bool Wait(nzUInt32 timeout); bool Wait(nzUInt32 timeout);
NzSemaphore& operator=(const NzSemaphore&) = delete;
NzSemaphore& operator=(NzSemaphore&&) = delete; ///TODO
private: private:
NzSemaphoreImpl* m_impl; NzSemaphoreImpl* m_impl;
}; };

View File

@ -9,12 +9,11 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Functor.hpp> #include <Nazara/Core/Functor.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <iosfwd> #include <iosfwd>
class NzThreadImpl; class NzThreadImpl;
class NAZARA_CORE_API NzThread : NzNonCopyable class NAZARA_CORE_API NzThread
{ {
public: public:
class Id; class Id;
@ -23,7 +22,8 @@ class NAZARA_CORE_API NzThread : NzNonCopyable
template<typename F> NzThread(F function); template<typename F> NzThread(F function);
template<typename F, typename... Args> NzThread(F function, Args&&... args); template<typename F, typename... Args> NzThread(F function, Args&&... args);
template<typename C> NzThread(void (C::*function)(), C* object); template<typename C> NzThread(void (C::*function)(), C* object);
NzThread(NzThread&& other); NzThread(const NzThread&) = delete;
NzThread(NzThread&& other);
~NzThread(); ~NzThread();
void Detach(); void Detach();
@ -31,7 +31,8 @@ class NAZARA_CORE_API NzThread : NzNonCopyable
bool IsJoinable() const; bool IsJoinable() const;
void Join(); void Join();
NzThread& operator=(NzThread&& thread); NzThread& operator=(const NzThread&) = delete;
NzThread& operator=(NzThread&& thread);
static unsigned int HardwareConcurrency(); static unsigned int HardwareConcurrency();
static void Sleep(nzUInt32 milliseconds); static void Sleep(nzUInt32 milliseconds);

View File

@ -9,7 +9,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp> #include <Nazara/Core/Color.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/SparsePtr.hpp> #include <Nazara/Core/SparsePtr.hpp>
#include <Nazara/Graphics/Config.hpp> #include <Nazara/Graphics/Config.hpp>
#include <Nazara/Math/Box.hpp> #include <Nazara/Math/Box.hpp>
@ -31,7 +30,8 @@ class NAZARA_GRAPHICS_API NzAbstractRenderQueue
struct SpotLight; struct SpotLight;
NzAbstractRenderQueue() = default; NzAbstractRenderQueue() = default;
NzAbstractRenderQueue(const NzAbstractRenderQueue&) = delete; NzAbstractRenderQueue(const NzAbstractRenderQueue&) = delete;
NzAbstractRenderQueue(NzAbstractRenderQueue&&) = default;
virtual ~NzAbstractRenderQueue(); virtual ~NzAbstractRenderQueue();
// Je ne suis vraiment pas fan du nombre de surcharges pour AddBillboards, // Je ne suis vraiment pas fan du nombre de surcharges pour AddBillboards,
@ -54,7 +54,8 @@ class NAZARA_GRAPHICS_API NzAbstractRenderQueue
virtual void Clear(bool fully = false); virtual void Clear(bool fully = false);
NzAbstractRenderQueue& operator=(const NzAbstractRenderQueue&) = delete; NzAbstractRenderQueue& operator=(const NzAbstractRenderQueue&) = delete;
NzAbstractRenderQueue& operator=(NzAbstractRenderQueue&&) = default;
struct DirectionalLight struct DirectionalLight
{ {

View File

@ -9,7 +9,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp> #include <Nazara/Core/Color.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#include <Nazara/Graphics/AbstractRenderQueue.hpp> #include <Nazara/Graphics/AbstractRenderQueue.hpp>
#include <Nazara/Graphics/Enums.hpp> #include <Nazara/Graphics/Enums.hpp>
@ -23,7 +22,8 @@ class NAZARA_GRAPHICS_API NzAbstractRenderTechnique
{ {
public: public:
NzAbstractRenderTechnique(); NzAbstractRenderTechnique();
NzAbstractRenderTechnique(const NzAbstractRenderTechnique&) = delete; NzAbstractRenderTechnique(const NzAbstractRenderTechnique&) = delete;
NzAbstractRenderTechnique(NzAbstractRenderTechnique&&) = default;
virtual ~NzAbstractRenderTechnique(); virtual ~NzAbstractRenderTechnique();
virtual bool Draw(const NzSceneData& sceneData) const = 0; virtual bool Draw(const NzSceneData& sceneData) const = 0;
@ -36,7 +36,8 @@ class NAZARA_GRAPHICS_API NzAbstractRenderTechnique
virtual bool IsInstancingEnabled() const; virtual bool IsInstancingEnabled() const;
NzAbstractRenderTechnique& operator=(const NzAbstractRenderTechnique&) = delete; NzAbstractRenderTechnique& operator=(const NzAbstractRenderTechnique&) = delete;
NzAbstractRenderTechnique& operator=(NzAbstractRenderTechnique&&) = default;
protected: protected:
bool m_instancingEnabled; bool m_instancingEnabled;

View File

@ -7,7 +7,6 @@
#ifndef NAZARA_INSTANCEDRENDERABLE_HPP #ifndef NAZARA_INSTANCEDRENDERABLE_HPP
#define NAZARA_INSTANCEDRENDERABLE_HPP #define NAZARA_INSTANCEDRENDERABLE_HPP
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/PrimitiveList.hpp> #include <Nazara/Core/PrimitiveList.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
@ -31,7 +30,8 @@ class NAZARA_GRAPHICS_API NzInstancedRenderable : public NzRefCounted
struct InstanceData; struct InstanceData;
NzInstancedRenderable() = default; NzInstancedRenderable() = default;
inline NzInstancedRenderable(const NzInstancedRenderable& renderable); inline NzInstancedRenderable(const NzInstancedRenderable& renderable);
NzInstancedRenderable(NzInstancedRenderable&& renderable) = delete;
virtual ~NzInstancedRenderable(); virtual ~NzInstancedRenderable();
inline void EnsureBoundingVolumeUpdated() const; inline void EnsureBoundingVolumeUpdated() const;
@ -44,6 +44,7 @@ class NAZARA_GRAPHICS_API NzInstancedRenderable : public NzRefCounted
virtual void UpdateData(InstanceData* instanceData) const; virtual void UpdateData(InstanceData* instanceData) const;
inline NzInstancedRenderable& operator=(const NzInstancedRenderable& renderable); inline NzInstancedRenderable& operator=(const NzInstancedRenderable& renderable);
NzInstancedRenderable& operator=(NzInstancedRenderable&& renderable) = delete;
// Signals: // Signals:
NazaraSignal(OnInstancedRenderableInvalidateData, const NzInstancedRenderable* /*instancedRenderable*/, nzUInt32 /*flags*/); NazaraSignal(OnInstancedRenderableInvalidateData, const NzInstancedRenderable* /*instancedRenderable*/, nzUInt32 /*flags*/);

View File

@ -7,9 +7,6 @@
#ifndef NAZARA_RENDERABLE_HPP #ifndef NAZARA_RENDERABLE_HPP
#define NAZARA_RENDERABLE_HPP #define NAZARA_RENDERABLE_HPP
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/PrimitiveList.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Graphics/Config.hpp> #include <Nazara/Graphics/Config.hpp>
#include <Nazara/Math/BoundingVolume.hpp> #include <Nazara/Math/BoundingVolume.hpp>
#include <Nazara/Math/Frustum.hpp> #include <Nazara/Math/Frustum.hpp>
@ -22,16 +19,17 @@ class NAZARA_GRAPHICS_API NzRenderable
public: public:
NzRenderable() = default; NzRenderable() = default;
NzRenderable(const NzRenderable& renderable) = default; NzRenderable(const NzRenderable& renderable) = default;
NzRenderable(NzRenderable&&) = default;
virtual ~NzRenderable(); virtual ~NzRenderable();
inline void EnsureBoundingVolumeUpdated() const;
virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0; virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0;
virtual bool Cull(const NzFrustumf& frustum, const NzMatrix4f& transformMatrix) const; virtual bool Cull(const NzFrustumf& frustum, const NzMatrix4f& transformMatrix) const;
inline void EnsureBoundingVolumeUpdated() const;
virtual const NzBoundingVolumef& GetBoundingVolume() const; virtual const NzBoundingVolumef& GetBoundingVolume() const;
virtual void UpdateBoundingVolume(const NzMatrix4f& transformMatrix); virtual void UpdateBoundingVolume(const NzMatrix4f& transformMatrix);
NzRenderable& operator=(const NzRenderable& renderable) = default; NzRenderable& operator=(const NzRenderable& renderable) = default;
NzRenderable& operator=(NzRenderable&& renderable) = default;
protected: protected:
virtual void MakeBoundingVolume() const = 0; virtual void MakeBoundingVolume() const = 0;

View File

@ -10,7 +10,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Clock.hpp> #include <Nazara/Core/Clock.hpp>
#include <Nazara/Core/InputStream.hpp> #include <Nazara/Core/InputStream.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#include <Nazara/Lua/Config.hpp> #include <Nazara/Lua/Config.hpp>
#include <Nazara/Lua/Enums.hpp> #include <Nazara/Lua/Enums.hpp>
@ -25,10 +24,12 @@ class NzLuaInstance;
using NzLuaCFunction = int (*)(lua_State* state); using NzLuaCFunction = int (*)(lua_State* state);
using NzLuaFunction = std::function<int(NzLuaInstance& instance)>; using NzLuaFunction = std::function<int(NzLuaInstance& instance)>;
class NAZARA_LUA_API NzLuaInstance : NzNonCopyable class NAZARA_LUA_API NzLuaInstance
{ {
public: public:
NzLuaInstance(); NzLuaInstance();
NzLuaInstance(const NzLuaInstance&) = delete;
NzLuaInstance(NzLuaInstance&&) = delete; ///TODO
~NzLuaInstance(); ~NzLuaInstance();
void ArgCheck(bool condition, unsigned int argNum, const char* error); void ArgCheck(bool condition, unsigned int argNum, const char* error);
@ -148,6 +149,9 @@ class NAZARA_LUA_API NzLuaInstance : NzNonCopyable
void* ToUserdata(int index, const char* tname) const; void* ToUserdata(int index, const char* tname) const;
void* ToUserdata(int index, const NzString& tname) const; void* ToUserdata(int index, const NzString& tname) const;
NzLuaInstance& operator=(const NzLuaInstance&) = delete;
NzLuaInstance& operator=(NzLuaInstance&&) = delete; ///TODO
static int GetIndexOfUpValue(int upValue); static int GetIndexOfUpValue(int upValue);
static NzLuaInstance* GetInstance(lua_State* state); static NzLuaInstance* GetInstance(lua_State* state);

View File

@ -8,7 +8,6 @@
#define NAZARA_GEOM_HPP #define NAZARA_GEOM_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/PrimitiveList.hpp> #include <Nazara/Core/PrimitiveList.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
@ -35,10 +34,12 @@ using NzPhysGeomConstRef = NzObjectRef<const NzPhysGeom>;
using NzPhysGeomLibrary = NzObjectLibrary<NzPhysGeom>; using NzPhysGeomLibrary = NzObjectLibrary<NzPhysGeom>;
using NzPhysGeomRef = NzObjectRef<NzPhysGeom>; using NzPhysGeomRef = NzObjectRef<NzPhysGeom>;
class NAZARA_PHYSICS_API NzPhysGeom : public NzRefCounted, NzNonCopyable class NAZARA_PHYSICS_API NzPhysGeom : public NzRefCounted
{ {
public: public:
NzPhysGeom() = default; NzPhysGeom() = default;
NzPhysGeom(const NzPhysGeom&) = delete;
NzPhysGeom(NzPhysGeom&&) = delete;
virtual ~NzPhysGeom(); virtual ~NzPhysGeom();
NzBoxf ComputeAABB(const NzVector3f& translation, const NzQuaternionf& rotation, const NzVector3f& scale) const; NzBoxf ComputeAABB(const NzVector3f& translation, const NzQuaternionf& rotation, const NzVector3f& scale) const;
@ -49,6 +50,9 @@ class NAZARA_PHYSICS_API NzPhysGeom : public NzRefCounted, NzNonCopyable
NewtonCollision* GetHandle(NzPhysWorld* world) const; NewtonCollision* GetHandle(NzPhysWorld* world) const;
virtual nzGeomType GetType() const = 0; virtual nzGeomType GetType() const = 0;
NzPhysGeom& operator=(const NzPhysGeom&) = delete;
NzPhysGeom& operator=(NzPhysGeom&&) = delete;
static NzPhysGeomRef Build(const NzPrimitiveList& list); static NzPhysGeomRef Build(const NzPrimitiveList& list);
// Signals: // Signals:

View File

@ -9,7 +9,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Enums.hpp> #include <Nazara/Core/Enums.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Math/Matrix4.hpp> #include <Nazara/Math/Matrix4.hpp>
#include <Nazara/Math/Quaternion.hpp> #include <Nazara/Math/Quaternion.hpp>
#include <Nazara/Math/Vector3.hpp> #include <Nazara/Math/Vector3.hpp>

View File

@ -8,17 +8,18 @@
#define NAZARA_PHYSWORLD_HPP #define NAZARA_PHYSWORLD_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Math/Box.hpp> #include <Nazara/Math/Box.hpp>
#include <Nazara/Math/Vector3.hpp> #include <Nazara/Math/Vector3.hpp>
#include <Nazara/Physics/Config.hpp> #include <Nazara/Physics/Config.hpp>
struct NewtonWorld; struct NewtonWorld;
class NAZARA_PHYSICS_API NzPhysWorld : NzNonCopyable class NAZARA_PHYSICS_API NzPhysWorld
{ {
public: public:
NzPhysWorld(); NzPhysWorld();
NzPhysWorld(const NzPhysWorld&) = delete;
NzPhysWorld(NzPhysWorld&&) = delete; ///TODO
~NzPhysWorld(); ~NzPhysWorld();
NzVector3f GetGravity() const; NzVector3f GetGravity() const;
@ -31,6 +32,9 @@ class NAZARA_PHYSICS_API NzPhysWorld : NzNonCopyable
void Step(float timestep); void Step(float timestep);
NzPhysWorld& operator=(const NzPhysWorld&) = delete;
NzPhysWorld& operator=(NzPhysWorld&&) = delete; ///TODO
private: private:
NzVector3f m_gravity; NzVector3f m_gravity;
NewtonWorld* m_world; NewtonWorld* m_world;

View File

@ -8,14 +8,15 @@
#define NAZARA_GPUQUERY_HPP #define NAZARA_GPUQUERY_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Renderer/Config.hpp> #include <Nazara/Renderer/Config.hpp>
#include <Nazara/Renderer/Enums.hpp> #include <Nazara/Renderer/Enums.hpp>
class NAZARA_RENDERER_API NzGpuQuery : NzNonCopyable class NAZARA_RENDERER_API NzGpuQuery
{ {
public: public:
NzGpuQuery(); NzGpuQuery();
NzGpuQuery(const NzGpuQuery&) = delete;
NzGpuQuery(NzGpuQuery&&) = delete; ///TODO
~NzGpuQuery(); ~NzGpuQuery();
void Begin(nzGpuQueryMode mode); void Begin(nzGpuQueryMode mode);
@ -28,6 +29,9 @@ class NAZARA_RENDERER_API NzGpuQuery : NzNonCopyable
// Fonctions OpenGL // Fonctions OpenGL
unsigned int GetOpenGLID() const; unsigned int GetOpenGLID() const;
NzGpuQuery& operator=(const NzGpuQuery&) = delete;
NzGpuQuery& operator=(NzGpuQuery&&) = delete; ///TODO
static bool IsModeSupported(nzGpuQueryMode mode); static bool IsModeSupported(nzGpuQueryMode mode);
static bool IsSupported(); static bool IsSupported();

View File

@ -8,7 +8,6 @@
#define NAZARA_RENDERBUFFER_HPP #define NAZARA_RENDERBUFFER_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp> #include <Nazara/Core/RefCounted.hpp>
@ -22,13 +21,15 @@ using NzRenderBufferConstRef = NzObjectRef<const NzRenderBuffer>;
using NzRenderBufferLibrary = NzObjectLibrary<NzRenderBuffer>; using NzRenderBufferLibrary = NzObjectLibrary<NzRenderBuffer>;
using NzRenderBufferRef = NzObjectRef<NzRenderBuffer>; using NzRenderBufferRef = NzObjectRef<NzRenderBuffer>;
class NAZARA_RENDERER_API NzRenderBuffer : public NzRefCounted, NzNonCopyable class NAZARA_RENDERER_API NzRenderBuffer : public NzRefCounted
{ {
friend NzRenderBufferLibrary; friend NzRenderBufferLibrary;
friend class NzRenderer; friend class NzRenderer;
public: public:
NzRenderBuffer(); NzRenderBuffer();
NzRenderBuffer(const NzRenderBuffer&) = delete;
NzRenderBuffer(NzRenderBuffer&&) = delete;
~NzRenderBuffer(); ~NzRenderBuffer();
bool Create(nzPixelFormat format, unsigned int width, unsigned int height); bool Create(nzPixelFormat format, unsigned int width, unsigned int height);
@ -43,6 +44,9 @@ class NAZARA_RENDERER_API NzRenderBuffer : public NzRefCounted, NzNonCopyable
bool IsValid() const; bool IsValid() const;
NzRenderBuffer& operator=(const NzRenderBuffer&) = delete;
NzRenderBuffer& operator=(NzRenderBuffer&&) = delete;
static bool IsSupported(); static bool IsSupported();
template<typename... Args> static NzRenderBufferRef New(Args&&... args); template<typename... Args> static NzRenderBufferRef New(Args&&... args);

View File

@ -8,7 +8,6 @@
#define NAZARA_RENDERTEXTURE_HPP #define NAZARA_RENDERTEXTURE_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Math/Rect.hpp> #include <Nazara/Math/Rect.hpp>
#include <Nazara/Renderer/Config.hpp> #include <Nazara/Renderer/Config.hpp>
#include <Nazara/Renderer/Enums.hpp> #include <Nazara/Renderer/Enums.hpp>
@ -23,10 +22,12 @@ class NzTexture;
struct NzRenderTextureImpl; struct NzRenderTextureImpl;
class NAZARA_RENDERER_API NzRenderTexture : public NzRenderTarget, NzNonCopyable class NAZARA_RENDERER_API NzRenderTexture : public NzRenderTarget
{ {
public: public:
inline NzRenderTexture(); inline NzRenderTexture();
NzRenderTexture(const NzRenderTexture&) = delete;
NzRenderTexture(NzRenderTexture&&) = delete; ///TODO
inline ~NzRenderTexture(); inline ~NzRenderTexture();
bool AttachBuffer(nzAttachmentPoint attachmentPoint, nzUInt8 index, NzRenderBuffer* buffer); bool AttachBuffer(nzAttachmentPoint attachmentPoint, nzUInt8 index, NzRenderBuffer* buffer);
@ -59,6 +60,9 @@ class NAZARA_RENDERER_API NzRenderTexture : public NzRenderTarget, NzNonCopyable
unsigned int GetOpenGLID() const; unsigned int GetOpenGLID() const;
bool HasContext() const override; bool HasContext() const override;
NzRenderTexture& operator=(const NzRenderTexture&) = delete;
NzRenderTexture& operator=(NzRenderTexture&&) = delete; ///TODO
static inline void Blit(NzRenderTexture* src, NzRenderTexture* dst, nzUInt32 buffers = nzRendererBuffer_Color | nzRendererBuffer_Depth | nzRendererBuffer_Stencil, bool bilinearFilter = false); static inline void Blit(NzRenderTexture* src, NzRenderTexture* dst, nzUInt32 buffers = nzRendererBuffer_Color | nzRendererBuffer_Depth | nzRendererBuffer_Stencil, bool bilinearFilter = false);
static void Blit(NzRenderTexture* src, NzRectui srcRect, NzRenderTexture* dst, NzRectui dstRect, nzUInt32 buffers = nzRendererBuffer_Color | nzRendererBuffer_Depth | nzRendererBuffer_Stencil, bool bilinearFilter = false); static void Blit(NzRenderTexture* src, NzRectui srcRect, NzRenderTexture* dst, NzRectui dstRect, nzUInt32 buffers = nzRendererBuffer_Color | nzRendererBuffer_Depth | nzRendererBuffer_Stencil, bool bilinearFilter = false);
static bool IsSupported(); static bool IsSupported();

View File

@ -10,7 +10,6 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/ByteArray.hpp> #include <Nazara/Core/ByteArray.hpp>
#include <Nazara/Core/Color.hpp> #include <Nazara/Core/Color.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp> #include <Nazara/Core/RefCounted.hpp>
@ -30,13 +29,15 @@ using NzShaderConstRef = NzObjectRef<const NzShader>;
using NzShaderLibrary = NzObjectLibrary<NzShader>; using NzShaderLibrary = NzObjectLibrary<NzShader>;
using NzShaderRef = NzObjectRef<NzShader>; using NzShaderRef = NzObjectRef<NzShader>;
class NAZARA_RENDERER_API NzShader : public NzRefCounted, NzNonCopyable class NAZARA_RENDERER_API NzShader : public NzRefCounted
{ {
friend NzShaderLibrary; friend NzShaderLibrary;
friend class NzRenderer; friend class NzRenderer;
public: public:
NzShader(); NzShader();
NzShader(const NzShader&) = delete;
NzShader(NzShader&&) = delete;
~NzShader(); ~NzShader();
void AttachStage(nzShaderStage stage, const NzShaderStage& shaderStage); void AttachStage(nzShaderStage stage, const NzShaderStage& shaderStage);
@ -98,6 +99,9 @@ class NAZARA_RENDERER_API NzShader : public NzRefCounted, NzNonCopyable
// Fonctions OpenGL // Fonctions OpenGL
unsigned int GetOpenGLID() const; unsigned int GetOpenGLID() const;
NzShader& operator=(const NzShader&) = delete;
NzShader& operator=(NzShader&&) = delete;
static bool IsStageSupported(nzShaderStage stage); static bool IsStageSupported(nzShaderStage stage);
template<typename... Args> static NzShaderRef New(Args&&... args); template<typename... Args> static NzShaderRef New(Args&&... args);

View File

@ -8,17 +8,17 @@
#define NAZARA_SHADERSTAGE_HPP #define NAZARA_SHADERSTAGE_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#include <Nazara/Renderer/Config.hpp> #include <Nazara/Renderer/Config.hpp>
#include <Nazara/Renderer/Enums.hpp> #include <Nazara/Renderer/Enums.hpp>
class NAZARA_RENDERER_API NzShaderStage : NzNonCopyable class NAZARA_RENDERER_API NzShaderStage
{ {
public: public:
NzShaderStage(); NzShaderStage();
NzShaderStage(nzShaderStage stage); NzShaderStage(nzShaderStage stage);
NzShaderStage(NzShaderStage&& stage); NzShaderStage(const NzShaderStage&) = delete;
NzShaderStage(NzShaderStage&& stage);
~NzShaderStage(); ~NzShaderStage();
bool Compile(); bool Compile();
@ -36,7 +36,8 @@ class NAZARA_RENDERER_API NzShaderStage : NzNonCopyable
void SetSource(const NzString& source); void SetSource(const NzString& source);
bool SetSourceFromFile(const NzString& filePath); bool SetSourceFromFile(const NzString& filePath);
NzShaderStage& operator=(NzShaderStage&& shader); NzShaderStage& operator=(const NzShaderStage&) = delete;
NzShaderStage& operator=(NzShaderStage&& shader);
// Fonctions OpenGL // Fonctions OpenGL
unsigned int GetOpenGLID() const; unsigned int GetOpenGLID() const;

View File

@ -8,7 +8,6 @@
#define NAZARA_TEXTURE_HPP #define NAZARA_TEXTURE_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp> #include <Nazara/Core/RefCounted.hpp>
@ -30,7 +29,7 @@ using NzTextureRef = NzObjectRef<NzTexture>;
struct NzTextureImpl; struct NzTextureImpl;
class NAZARA_RENDERER_API NzTexture : public NzAbstractImage, public NzRefCounted, public NzResource, NzNonCopyable class NAZARA_RENDERER_API NzTexture : public NzAbstractImage, public NzRefCounted, public NzResource
{ {
friend NzTextureLibrary; friend NzTextureLibrary;
friend NzTextureManager; friend NzTextureManager;
@ -40,6 +39,8 @@ class NAZARA_RENDERER_API NzTexture : public NzAbstractImage, public NzRefCounte
NzTexture() = default; NzTexture() = default;
NzTexture(nzImageType type, nzPixelFormat format, unsigned int width, unsigned int height, unsigned int depth = 1, nzUInt8 levelCount = 1); NzTexture(nzImageType type, nzPixelFormat format, unsigned int width, unsigned int height, unsigned int depth = 1, nzUInt8 levelCount = 1);
explicit NzTexture(const NzImage& image); explicit NzTexture(const NzImage& image);
NzTexture(const NzTexture&) = delete;
NzTexture(NzTexture&&) = delete;
~NzTexture(); ~NzTexture();
bool Create(nzImageType type, nzPixelFormat format, unsigned int width, unsigned int height, unsigned int depth = 1, nzUInt8 levelCount = 1); bool Create(nzImageType type, nzPixelFormat format, unsigned int width, unsigned int height, unsigned int depth = 1, nzUInt8 levelCount = 1);
@ -102,6 +103,9 @@ class NAZARA_RENDERER_API NzTexture : public NzAbstractImage, public NzRefCounte
// Fonctions OpenGL // Fonctions OpenGL
unsigned int GetOpenGLID() const; unsigned int GetOpenGLID() const;
NzTexture& operator=(const NzTexture&) = delete;
NzTexture& operator=(NzTexture&&) = delete;
static unsigned int GetValidSize(unsigned int size); static unsigned int GetValidSize(unsigned int size);
static bool IsFormatSupported(nzPixelFormat format); static bool IsFormatSupported(nzPixelFormat format);
static bool IsMipmappingSupported(); static bool IsMipmappingSupported();

View File

@ -8,7 +8,6 @@
#define NAZARA_BUFFER_HPP #define NAZARA_BUFFER_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/RefCounted.hpp> #include <Nazara/Core/RefCounted.hpp>
#include <Nazara/Core/Signal.hpp> #include <Nazara/Core/Signal.hpp>
@ -22,7 +21,7 @@ using NzBufferRef = NzObjectRef<NzBuffer>;
class NzAbstractBuffer; class NzAbstractBuffer;
class NAZARA_UTILITY_API NzBuffer : public NzRefCounted, NzNonCopyable class NAZARA_UTILITY_API NzBuffer : public NzRefCounted
{ {
friend class NzUtility; friend class NzUtility;
@ -31,6 +30,8 @@ class NAZARA_UTILITY_API NzBuffer : public NzRefCounted, NzNonCopyable
NzBuffer(nzBufferType type); NzBuffer(nzBufferType type);
NzBuffer(nzBufferType type, unsigned int size, nzUInt32 storage = nzDataStorage_Software, nzBufferUsage usage = nzBufferUsage_Static); NzBuffer(nzBufferType type, unsigned int size, nzUInt32 storage = nzDataStorage_Software, nzBufferUsage usage = nzBufferUsage_Static);
NzBuffer(const NzBuffer&) = delete;
NzBuffer(NzBuffer&&) = delete;
~NzBuffer(); ~NzBuffer();
bool CopyContent(const NzBuffer& buffer); bool CopyContent(const NzBuffer& buffer);
@ -56,6 +57,9 @@ class NAZARA_UTILITY_API NzBuffer : public NzRefCounted, NzNonCopyable
void Unmap() const; void Unmap() const;
NzBuffer& operator=(const NzBuffer&) = delete;
NzBuffer& operator=(NzBuffer&&) = delete;
static bool IsStorageSupported(nzUInt32 storage); static bool IsStorageSupported(nzUInt32 storage);
template<typename... Args> static NzBufferRef New(Args&&... args); template<typename... Args> static NzBufferRef New(Args&&... args);
static void SetBufferFactory(nzUInt32 storage, BufferFactory func); static void SetBufferFactory(nzUInt32 storage, BufferFactory func);

View File

@ -10,7 +10,6 @@
#define NAZARA_FONT_HPP #define NAZARA_FONT_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/ObjectLibrary.hpp> #include <Nazara/Core/ObjectLibrary.hpp>
#include <Nazara/Core/ObjectRef.hpp> #include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/Resource.hpp> #include <Nazara/Core/Resource.hpp>
@ -34,7 +33,7 @@ using NzFontLibrary = NzObjectLibrary<NzFont>;
using NzFontLoader = NzResourceLoader<NzFont, NzFontParams>; using NzFontLoader = NzResourceLoader<NzFont, NzFontParams>;
using NzFontRef = NzObjectRef<NzFont>; using NzFontRef = NzObjectRef<NzFont>;
class NAZARA_UTILITY_API NzFont : public NzRefCounted, public NzResource, NzNonCopyable class NAZARA_UTILITY_API NzFont : public NzRefCounted, public NzResource
{ {
friend NzFontLibrary; friend NzFontLibrary;
friend NzFontLoader; friend NzFontLoader;
@ -45,6 +44,8 @@ class NAZARA_UTILITY_API NzFont : public NzRefCounted, public NzResource, NzNonC
struct SizeInfo; struct SizeInfo;
NzFont(); NzFont();
NzFont(const NzFont&) = delete;
NzFont(NzFont&&) = delete;
~NzFont(); ~NzFont();
void ClearGlyphCache(); void ClearGlyphCache();
@ -81,6 +82,9 @@ class NAZARA_UTILITY_API NzFont : public NzRefCounted, public NzResource, NzNonC
void SetGlyphBorder(unsigned int borderSize); void SetGlyphBorder(unsigned int borderSize);
void SetMinimumStepSize(unsigned int minimumStepSize); void SetMinimumStepSize(unsigned int minimumStepSize);
NzFont& operator=(const NzFont&) = delete;
NzFont& operator=(NzFont&&) = delete;
static std::shared_ptr<NzAbstractAtlas> GetDefaultAtlas(); static std::shared_ptr<NzAbstractAtlas> GetDefaultAtlas();
static NzFont* GetDefault(); static NzFont* GetDefault();
static unsigned int GetDefaultGlyphBorder(); static unsigned int GetDefaultGlyphBorder();

View File

@ -10,7 +10,6 @@
#define NAZARA_WINDOW_HPP #define NAZARA_WINDOW_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#include <Nazara/Math/Vector2.hpp> #include <Nazara/Math/Vector2.hpp>
#include <Nazara/Utility/Config.hpp> #include <Nazara/Utility/Config.hpp>
@ -30,7 +29,7 @@ class NzImage;
class NzIcon; class NzIcon;
class NzWindowImpl; class NzWindowImpl;
class NAZARA_UTILITY_API NzWindow : NzNonCopyable class NAZARA_UTILITY_API NzWindow
{ {
friend NzWindowImpl; friend NzWindowImpl;
friend class NzMouse; friend class NzMouse;
@ -40,6 +39,8 @@ class NAZARA_UTILITY_API NzWindow : NzNonCopyable
NzWindow(); NzWindow();
NzWindow(NzVideoMode mode, const NzString& title, nzUInt32 style = nzWindowStyle_Default); NzWindow(NzVideoMode mode, const NzString& title, nzUInt32 style = nzWindowStyle_Default);
NzWindow(NzWindowHandle handle); NzWindow(NzWindowHandle handle);
NzWindow(const NzWindow&) = delete;
NzWindow(NzWindow&&) = delete; ///TODO
virtual ~NzWindow(); virtual ~NzWindow();
void Close(); void Close();
@ -89,6 +90,9 @@ class NAZARA_UTILITY_API NzWindow : NzNonCopyable
bool WaitEvent(NzEvent* event); bool WaitEvent(NzEvent* event);
NzWindow& operator=(const NzWindow&) = delete;
NzWindow& operator=(NzWindow&&) = delete; ///TODO
protected: protected:
virtual bool OnWindowCreated(); virtual bool OnWindowCreated();
virtual void OnWindowDestroy(); virtual void OnWindowDestroy();

View File

@ -8,16 +8,17 @@
#define NAZARA_DIRECTORYIMPL_HPP #define NAZARA_DIRECTORYIMPL_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <windows.h> #include <windows.h>
class NzDirectory; class NzDirectory;
class NzString; class NzString;
class NzDirectoryImpl : NzNonCopyable class NzDirectoryImpl
{ {
public: public:
NzDirectoryImpl(const NzDirectory* parent); NzDirectoryImpl(const NzDirectory* parent);
NzDirectoryImpl(const NzDirectoryImpl&) = delete;
NzDirectoryImpl(NzDirectoryImpl&&) = delete; ///TODO
~NzDirectoryImpl() = default; ~NzDirectoryImpl() = default;
void Close(); void Close();
@ -31,6 +32,9 @@ class NzDirectoryImpl : NzNonCopyable
bool Open(const NzString& dirPath); bool Open(const NzString& dirPath);
NzDirectoryImpl& operator=(const NzDirectoryImpl&) = delete;
NzDirectoryImpl& operator=(NzDirectoryImpl&&) = delete; ///TODO
static bool Create(const NzString& dirPath); static bool Create(const NzString& dirPath);
static bool Exists(const NzString& dirPath); static bool Exists(const NzString& dirPath);
static NzString GetCurrent(); static NzString GetCurrent();

View File

@ -9,21 +9,25 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/DynLib.hpp> #include <Nazara/Core/DynLib.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <windows.h> #include <windows.h>
class NzString; class NzString;
class NzDynLibImpl : NzNonCopyable class NzDynLibImpl
{ {
public: public:
NzDynLibImpl(NzDynLib* m_parent); NzDynLibImpl(NzDynLib* m_parent);
NzDynLibImpl(const NzDynLibImpl&) = delete;
NzDynLibImpl(NzDynLibImpl&&) = delete; ///TODO?
~NzDynLibImpl() = default; ~NzDynLibImpl() = default;
NzDynLibFunc GetSymbol(const NzString& symbol, NzString* errorMessage) const; NzDynLibFunc GetSymbol(const NzString& symbol, NzString* errorMessage) const;
bool Load(const NzString& libraryPath, NzString* errorMessage); bool Load(const NzString& libraryPath, NzString* errorMessage);
void Unload(); void Unload();
NzDynLibImpl& operator=(const NzDynLibImpl&) = delete;
NzDynLibImpl& operator=(NzDynLibImpl&&) = delete; ///TODO?
private: private:
HMODULE m_handle; HMODULE m_handle;
}; };

View File

@ -9,17 +9,18 @@
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/File.hpp> #include <Nazara/Core/File.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <ctime> #include <ctime>
#include <windows.h> #include <windows.h>
class NzFile; class NzFile;
class NzString; class NzString;
class NzFileImpl : NzNonCopyable class NzFileImpl
{ {
public: public:
NzFileImpl(const NzFile* parent); NzFileImpl(const NzFile* parent);
NzFileImpl(const NzFileImpl&) = delete;
NzFileImpl(NzFileImpl&&) = delete; ///TODO
~NzFileImpl() = default; ~NzFileImpl() = default;
void Close(); void Close();
@ -31,6 +32,9 @@ class NzFileImpl : NzNonCopyable
bool SetCursorPos(nzCursorPosition pos, nzInt64 offset); bool SetCursorPos(nzCursorPosition pos, nzInt64 offset);
std::size_t Write(const void* buffer, std::size_t size); std::size_t Write(const void* buffer, std::size_t size);
NzFileImpl& operator=(const NzFileImpl&) = delete;
NzFileImpl& operator=(NzFileImpl&&) = delete; ///TODO
static bool Copy(const NzString& sourcePath, const NzString& targetPath); static bool Copy(const NzString& sourcePath, const NzString& targetPath);
static bool Delete(const NzString& filePath); static bool Delete(const NzString& filePath);
static bool Exists(const NzString& filePath); static bool Exists(const NzString& filePath);

View File

@ -10,7 +10,6 @@
#define NAZARA_WINDOWIMPL_HPP #define NAZARA_WINDOWIMPL_HPP
#include <Nazara/Prerequesites.hpp> #include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/String.hpp> #include <Nazara/Core/String.hpp>
#include <Nazara/Core/Thread.hpp> #include <Nazara/Core/Thread.hpp>
#include <Nazara/Math/Vector2.hpp> #include <Nazara/Math/Vector2.hpp>
@ -29,10 +28,12 @@ class NzWindow;
#undef IsMinimized // Conflit avec la méthode du même nom #undef IsMinimized // Conflit avec la méthode du même nom
class NzWindowImpl : NzNonCopyable class NzWindowImpl
{ {
public: public:
NzWindowImpl(NzWindow* parent); NzWindowImpl(NzWindow* parent);
NzWindowImpl(const NzWindowImpl&) = delete;
NzWindowImpl(NzWindowImpl&&) = delete; ///TODO?
~NzWindowImpl() = default; ~NzWindowImpl() = default;
bool Create(const NzVideoMode& mode, const NzString& title, nzUInt32 style); bool Create(const NzVideoMode& mode, const NzString& title, nzUInt32 style);
@ -73,6 +74,9 @@ class NzWindowImpl : NzNonCopyable
void SetTitle(const NzString& title); void SetTitle(const NzString& title);
void SetVisible(bool visible); void SetVisible(bool visible);
NzWindowImpl& operator=(const NzWindowImpl&) = delete;
NzWindowImpl& operator=(NzWindowImpl&&) = delete; ///TODO?
static bool Initialize(); static bool Initialize();
static void Uninitialize(); static void Uninitialize();