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

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

View File

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

View File

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