7 #ifndef NAZARA_RESOURCEREF_HPP 8 #define NAZARA_RESOURCEREF_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Core/Algorithm.hpp> 12 #include <Nazara/Core/RefCounted.hpp> 13 #include <type_traits> 31 bool Reset(T*
object =
nullptr);
34 explicit operator bool()
const;
55 template<
typename T>
bool operator<(const ObjectRef<T>& lhs,
const ObjectRef<T>& rhs);
56 template<
typename T>
bool operator<(const T& lhs, const ObjectRef<T>& rhs);
57 template<
typename T>
bool operator<(const ObjectRef<T>& lhs,
const T& rhs);
59 template<
typename T>
bool operator<=(const ObjectRef<T>& lhs,
const ObjectRef<T>& rhs);
60 template<
typename T>
bool operator<=(const T& lhs, const ObjectRef<T>& rhs);
61 template<
typename T>
bool operator<=(const ObjectRef<T>& lhs,
const T& rhs);
72 template<
typename T>
struct PointedType<ObjectRef<T>> {
typedef T type; };
73 template<
typename T>
struct PointedType<ObjectRef<T> const> {
typedef T type; };
76 #include <Nazara/Core/ObjectRef.inl> 78 #endif // NAZARA_RESOURCEREF_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
T * Release()
Releases the handle of the pointer.
Definition: ObjectRef.inl:110
bool operator>(const Bitset< Block, Allocator > &lhs, const Nz::Bitset< Block, Allocator > &rhs)
Compares two bitsets.
Definition: Bitset.inl:1566
bool operator!=(const Bitset< Block, Allocator > &lhs, const Nz::Bitset< Block, Allocator > &rhs)
Compares two bitsets.
Definition: Bitset.inl:1503
T * operator->() const
Dereferences the ObjectRef.
Definition: ObjectRef.inl:183
Core class that represents a reference to an object.
Definition: ObjectRef.hpp:18
bool Reset(T *object=nullptr)
Resets the content of the ObjectRef with another pointer.
Definition: ObjectRef.inl:126
ObjectRef & Swap(ObjectRef &ref)
Swaps the content of the two ObjectRef.
Definition: ObjectRef.inl:149
~ObjectRef()
Destructs the object (remove a reference to the object when shared)
Definition: ObjectRef.inl:79
ObjectRef()
Constructs a ObjectRef object by default.
Definition: ObjectRef.inl:20
T * Get() const
Gets the underlying pointer.
Definition: ObjectRef.inl:90
ObjectRef & operator=(T *object)
Assigns the object into this.
Definition: ObjectRef.inl:195
bool operator==(const Bitset< Block, Allocator > &lhs, const Nz::Bitset< Block, Allocator > &rhs)
Compares two bitsets.
Definition: Bitset.inl:1469
bool operator>=(const Bitset< Block, Allocator > &lhs, const Nz::Bitset< Block, Allocator > &rhs)
Compares two bitsets.
Definition: Bitset.inl:1580
bool IsValid() const
Checks whether the reference is valid.
Definition: ObjectRef.inl:100