Core: Add MovablePtr class
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Functor.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <iosfwd>
|
||||
|
||||
namespace Nz
|
||||
@@ -25,7 +26,7 @@ namespace Nz
|
||||
template<typename F, typename... Args> Thread(F function, Args&&... args);
|
||||
template<typename C> Thread(void (C::*function)(), C* object);
|
||||
Thread(const Thread&) = delete;
|
||||
Thread(Thread&& other) noexcept;
|
||||
Thread(Thread&& other) noexcept = default;
|
||||
~Thread();
|
||||
|
||||
void Detach();
|
||||
@@ -35,7 +36,7 @@ namespace Nz
|
||||
void SetName(const String& name);
|
||||
|
||||
Thread& operator=(const Thread&) = delete;
|
||||
Thread& operator=(Thread&& thread);
|
||||
Thread& operator=(Thread&& thread) noexcept = default;
|
||||
|
||||
static unsigned int HardwareConcurrency();
|
||||
static void SetCurrentThreadName(const String& name);
|
||||
@@ -44,7 +45,7 @@ namespace Nz
|
||||
private:
|
||||
void CreateImpl(Functor* functor);
|
||||
|
||||
ThreadImpl* m_impl;
|
||||
MovablePtr<ThreadImpl> m_impl;
|
||||
};
|
||||
|
||||
class NAZARA_CORE_API Thread::Id
|
||||
|
||||
Reference in New Issue
Block a user