Merge branch 'master' into NDK-ShadowMapping
Former-commit-id: 83435ab51753299b30a102871fbcd5558d2ac4f1
This commit is contained in:
@@ -11,35 +11,38 @@
|
||||
#include <Nazara/Core/RefCounted.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
template<typename T>
|
||||
class NzObjectRef
|
||||
namespace Nz
|
||||
{
|
||||
public:
|
||||
NzObjectRef();
|
||||
NzObjectRef(T* object);
|
||||
NzObjectRef(const NzObjectRef& ref);
|
||||
template<typename U> NzObjectRef(const NzObjectRef<U>& ref);
|
||||
NzObjectRef(NzObjectRef&& ref) noexcept;
|
||||
~NzObjectRef();
|
||||
template<typename T>
|
||||
class ObjectRef
|
||||
{
|
||||
public:
|
||||
ObjectRef();
|
||||
ObjectRef(T* object);
|
||||
ObjectRef(const ObjectRef& ref);
|
||||
template<typename U> ObjectRef(const ObjectRef<U>& ref);
|
||||
ObjectRef(ObjectRef&& ref) noexcept;
|
||||
~ObjectRef();
|
||||
|
||||
T* Get() const;
|
||||
bool IsValid() const;
|
||||
T* Release();
|
||||
bool Reset(T* object = nullptr);
|
||||
NzObjectRef& Swap(NzObjectRef& ref);
|
||||
T* Get() const;
|
||||
bool IsValid() const;
|
||||
T* Release();
|
||||
bool Reset(T* object = nullptr);
|
||||
ObjectRef& Swap(ObjectRef& ref);
|
||||
|
||||
operator bool() const;
|
||||
operator T*() const;
|
||||
T* operator->() const;
|
||||
operator bool() const;
|
||||
operator T*() const;
|
||||
T* operator->() const;
|
||||
|
||||
NzObjectRef& operator=(T* object);
|
||||
NzObjectRef& operator=(const NzObjectRef& ref);
|
||||
template<typename U> NzObjectRef& operator=(const NzObjectRef<U>& ref);
|
||||
NzObjectRef& operator=(NzObjectRef&& ref) noexcept;
|
||||
ObjectRef& operator=(T* object);
|
||||
ObjectRef& operator=(const ObjectRef& ref);
|
||||
template<typename U> ObjectRef& operator=(const ObjectRef<U>& ref);
|
||||
ObjectRef& operator=(ObjectRef&& ref) noexcept;
|
||||
|
||||
private:
|
||||
T* m_object;
|
||||
};
|
||||
private:
|
||||
T* m_object;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Core/ObjectRef.inl>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user