Improve documentation
Former-commit-id: 08d70f6a53a7f12d2748d145d1fe139595a1b39e
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::AbstractLogger
|
||||
* \brief Logger interface
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies the tuple to the function
|
||||
* \ingroup core
|
||||
* \brief Applies the tuple to the function (e.g. calls the function using the tuple content as arguments)
|
||||
* \return The result of the function
|
||||
*
|
||||
* \param fn Function
|
||||
@@ -39,7 +40,6 @@ namespace Nz
|
||||
*
|
||||
* \see Apply
|
||||
*/
|
||||
|
||||
template<typename F, typename Tuple>
|
||||
auto Apply(F&& fn, Tuple&& t)
|
||||
{
|
||||
@@ -49,7 +49,8 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Applies the tuple to the member function on an object
|
||||
* \ingroup core
|
||||
* \brief Applies the tuple to the member function on an object (e.g. calls the member function using the tuple content as arguments)
|
||||
* \return The result of the member function called
|
||||
*
|
||||
* \param object Object of a class
|
||||
@@ -58,7 +59,6 @@ namespace Nz
|
||||
*
|
||||
* \see Apply
|
||||
*/
|
||||
|
||||
template<typename O, typename F, typename Tuple>
|
||||
auto Apply(O& object, F&& fn, Tuple&& t)
|
||||
{
|
||||
@@ -68,15 +68,17 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Computes the hash of a hashable object
|
||||
* \return A bytearray which represents the hash
|
||||
*
|
||||
* \param hash Enumeration of type HashType
|
||||
* \param v Object to hash, must be convertible to "Nz::String"
|
||||
* \param v Object to hash
|
||||
*
|
||||
* \remark a HashAppend specialization for type T is required
|
||||
*
|
||||
* \see ComputeHash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ByteArray ComputeHash(HashType hash, const T& v)
|
||||
{
|
||||
@@ -84,17 +86,18 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Computes the hash of a hashable object
|
||||
* \return A bytearray which represents the hash
|
||||
*
|
||||
* \param hash Pointer to abstract hash
|
||||
* \param v Object to hash, must be convertible to "Nz::String"
|
||||
* \param v Object to hash
|
||||
*
|
||||
* \remark Produce a NazaraAssert if pointer to Abstracthash is invalid
|
||||
* \remark a HashAppend specialization for type T is required
|
||||
*
|
||||
* \see ComputeHash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ByteArray ComputeHash(AbstractHash* hash, const T& v)
|
||||
{
|
||||
@@ -108,6 +111,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Returns the number of elements in a C-array
|
||||
* \return The number of elements
|
||||
*
|
||||
@@ -115,7 +119,6 @@ namespace Nz
|
||||
*
|
||||
* \see CountOf
|
||||
*/
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
constexpr std::size_t CountOf(T(&name)[N]) noexcept
|
||||
{
|
||||
@@ -123,6 +126,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Returns the number of elements in a container
|
||||
* \return The number of elements
|
||||
*
|
||||
@@ -130,7 +134,6 @@ namespace Nz
|
||||
*
|
||||
* \see CountOf
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::size_t CountOf(const T& c)
|
||||
{
|
||||
@@ -138,12 +141,12 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Combines two hash in one
|
||||
*
|
||||
* \param seed First value that will be modified (expected to be 64bits)
|
||||
* \param v Second value to hash
|
||||
*/
|
||||
|
||||
// Algorithm from CityHash by Google
|
||||
// http://stackoverflow.com/questions/8513911/how-to-create-a-good-hash-combine-with-64-bit-output-inspired-by-boosthash-co
|
||||
template<typename T>
|
||||
@@ -167,6 +170,7 @@ namespace Nz
|
||||
template<typename T> struct PointedType<T* const volatile> {typedef T type;};
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Serializes a boolean
|
||||
* \return true if serialization succedeed
|
||||
*
|
||||
@@ -175,7 +179,6 @@ namespace Nz
|
||||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
inline bool Serialize(SerializationContext& context, bool value)
|
||||
{
|
||||
if (context.currentBitPos == 8)
|
||||
@@ -194,6 +197,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Serializes an arithmetic type
|
||||
* \return true if serialization succedeed
|
||||
*
|
||||
@@ -202,7 +206,6 @@ namespace Nz
|
||||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Serialize(SerializationContext& context, T value)
|
||||
{
|
||||
@@ -222,6 +225,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Unserializes a boolean
|
||||
* \return true if unserialization succedeed
|
||||
*
|
||||
@@ -230,7 +234,6 @@ namespace Nz
|
||||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
inline bool Unserialize(SerializationContext& context, bool* value)
|
||||
{
|
||||
if (context.currentBitPos == 8)
|
||||
@@ -250,6 +253,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Unserializes an arithmetic type
|
||||
* \return true if unserialization succedeed
|
||||
*
|
||||
@@ -260,7 +264,6 @@ namespace Nz
|
||||
*
|
||||
* \see Serialize, Unserialize
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Unserialize(SerializationContext& context, T* value)
|
||||
{
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Bitset<Block, Allocator>
|
||||
* \ingroup core
|
||||
* \class Nz::Bitset
|
||||
* \brief Core class that represents a set of bits
|
||||
*
|
||||
* This class meets the requirements of Container, AllocatorAwareContainer, SequenceContainer
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object by default
|
||||
* \brief Constructs a Bitset object by default
|
||||
*/
|
||||
|
||||
template<typename Block, class Allocator>
|
||||
@@ -34,7 +35,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object of bitCount bits to value val
|
||||
* \brief Constructs a Bitset object of bitCount bits to value val
|
||||
*
|
||||
* \param bitCount Number of bits
|
||||
* \param val Value of those bits, by default false
|
||||
@@ -48,7 +49,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from the contents initialized with a copy of the null-terminated character string pointed to by bits
|
||||
* \brief Constructs a Bitset object from the contents initialized with a copy of the null-terminated character string pointed to by bits
|
||||
*
|
||||
* \param bits Null-terminated character string containing only '0' and '1'
|
||||
*
|
||||
@@ -62,7 +63,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from the contents initialized with a copy of the character string pointed to by bits takings the bitCount first characters
|
||||
* \brief Constructs a Bitset object from the contents initialized with a copy of the character string pointed to by bits takings the bitCount first characters
|
||||
*
|
||||
* \param bits Character string containing only '0' and '1'
|
||||
* \param bitCount Number of characters to take into consideration
|
||||
@@ -96,7 +97,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Bitset<Block, Allocator> object from a Nz::String
|
||||
* \brief Constructs a Bitset object from a Nz::String
|
||||
*
|
||||
* \param bits String containing only '0' and '1'
|
||||
*/
|
||||
@@ -912,7 +913,7 @@ namespace Nz
|
||||
|
||||
template<typename Block, class Allocator>
|
||||
template<bool BadCall>
|
||||
void* Bitset<Block, Allocator>::Bit::operator&() const
|
||||
void* Bitset::Bit::operator&() const
|
||||
{
|
||||
// The template is necessary to make it fail only when used
|
||||
static_assert(!BadCall, "It is impossible to take the address of a bit in a bitset");
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::CallOnExit
|
||||
* \brief Core class that represents a function to call at the end of the scope
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Color
|
||||
* \brief Core class that represents a color
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
#ifndef NAZARA_CONFIG_CORE_HPP
|
||||
#define NAZARA_CONFIG_CORE_HPP
|
||||
|
||||
/*!
|
||||
* \defgroup core (NazaraCore) Core module
|
||||
* Core/System module including classes to handle threading, time, hardware info, memory management, etc...
|
||||
*/
|
||||
|
||||
/// Each modification of a parameter needs a recompilation of the module
|
||||
|
||||
// Precision of reals when transformed into string (Max. numbers after the coma)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Gets the platform endianness
|
||||
* \return Type of the endianness
|
||||
*/
|
||||
@@ -22,6 +23,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Swaps the byte for endianness operations
|
||||
*
|
||||
* \param buffer Raw memory
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::StdLogger
|
||||
* \brief Core class that represents a functor
|
||||
* \ingroup core
|
||||
* \class Nz::FunctorWithoutArgs
|
||||
* \brief Core class that represents a functor using a function without argument
|
||||
*/
|
||||
|
||||
/*!
|
||||
@@ -16,7 +17,6 @@ namespace Nz
|
||||
*
|
||||
* \param func Function to execute
|
||||
*/
|
||||
|
||||
template<typename F>
|
||||
FunctorWithoutArgs<F>::FunctorWithoutArgs(F func) :
|
||||
m_func(func)
|
||||
@@ -26,7 +26,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename F>
|
||||
void FunctorWithoutArgs<F>::Run()
|
||||
{
|
||||
@@ -34,12 +33,17 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithoutArgs object with a function and its arguments
|
||||
* \ingroup core
|
||||
* \class Nz::FunctorWithArgs
|
||||
* \brief Core class that represents a functor using a function with arguments
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithArgs object with a function and its arguments
|
||||
*
|
||||
* \param func Function to execute
|
||||
* \param args Arguments for the function
|
||||
*/
|
||||
|
||||
template<typename F, typename... Args>
|
||||
FunctorWithArgs<F, Args...>::FunctorWithArgs(F func, Args&&... args) :
|
||||
m_func(func),
|
||||
@@ -50,7 +54,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename F, typename... Args>
|
||||
void FunctorWithArgs<F, Args...>::Run()
|
||||
{
|
||||
@@ -58,12 +61,17 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a FunctorWithoutArgs object with a member function and an object
|
||||
* \ingroup core
|
||||
* \class Nz::MemberWithoutArgs
|
||||
* \brief Core class that represents a functor using a member function
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a MemberWithoutArgs object with a member function and an object
|
||||
*
|
||||
* \param func Member function to execute
|
||||
* \param object Object to execute on
|
||||
*/
|
||||
|
||||
template<typename C>
|
||||
MemberWithoutArgs<C>::MemberWithoutArgs(void (C::*func)(), C* object) :
|
||||
m_func(func),
|
||||
@@ -74,7 +82,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Runs the function
|
||||
*/
|
||||
|
||||
template<typename C>
|
||||
void MemberWithoutArgs<C>::Run()
|
||||
{
|
||||
|
||||
@@ -48,7 +48,8 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Initializer<Args...>
|
||||
* \ingroup core
|
||||
* \class Nz::Initializer
|
||||
* \brief Core class that represents a module initializer
|
||||
*/
|
||||
|
||||
@@ -57,7 +58,6 @@ namespace Nz
|
||||
*
|
||||
* \param initialize Initialize the module
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::Initializer(bool initialize) :
|
||||
m_initialized(false)
|
||||
@@ -71,7 +71,6 @@ namespace Nz
|
||||
*
|
||||
* \see Uninitialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::~Initializer()
|
||||
{
|
||||
@@ -83,7 +82,6 @@ namespace Nz
|
||||
*
|
||||
* \see Uninitialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
bool Initializer<Args...>::Initialize()
|
||||
{
|
||||
@@ -97,7 +95,6 @@ namespace Nz
|
||||
* \brief Checks whether the module is initialized
|
||||
* \return true if initialized
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
bool Initializer<Args...>::IsInitialized() const
|
||||
{
|
||||
@@ -109,7 +106,6 @@ namespace Nz
|
||||
*
|
||||
* \see Initialize
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
void Initializer<Args...>::Uninitialize()
|
||||
{
|
||||
@@ -121,7 +117,6 @@ namespace Nz
|
||||
* \brief Converts the initializer to boolean
|
||||
* \return true if initialized
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
Initializer<Args...>::operator bool() const
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \fn Nz::MemoryHelper
|
||||
* \brief Core functions that helps the handle of memory in the engine
|
||||
*/
|
||||
@@ -26,7 +27,6 @@ namespace Nz
|
||||
*
|
||||
* \remark Uses MemoryManager with NAZARA_CORE_MANAGE_MEMORY defined else operator delete
|
||||
*/
|
||||
|
||||
inline void OperatorDelete(void* ptr)
|
||||
{
|
||||
#if NAZARA_CORE_MANAGE_MEMORY
|
||||
@@ -41,7 +41,6 @@ namespace Nz
|
||||
*
|
||||
* \remark Uses MemoryManager with NAZARA_CORE_MANAGE_MEMORY defined else operator new
|
||||
*/
|
||||
|
||||
inline void* OperatorNew(std::size_t size)
|
||||
{
|
||||
#if NAZARA_CORE_MANAGE_MEMORY
|
||||
@@ -58,7 +57,6 @@ namespace Nz
|
||||
* \param ptr Pointer to raw memory allocated
|
||||
* \param args Arguments for the constructor
|
||||
*/
|
||||
|
||||
template<typename T, typename... Args>
|
||||
T* PlacementNew(void* ptr, Args&&... args)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryPool
|
||||
* \brief Core class that represents a memory pool
|
||||
*/
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::MemoryStream
|
||||
* \brief Constructs a MemoryStream object by default
|
||||
*/
|
||||
|
||||
inline MemoryStream::MemoryStream() :
|
||||
Stream(StreamOption_None, OpenMode_ReadWrite),
|
||||
m_pos(0)
|
||||
@@ -23,7 +24,6 @@ namespace Nz
|
||||
* \param byteArray Bytes to stream
|
||||
* \param openMode Reading/writing mode for the stream
|
||||
*/
|
||||
|
||||
inline MemoryStream::MemoryStream(ByteArray* byteArray, UInt32 openMode) :
|
||||
MemoryStream()
|
||||
{
|
||||
@@ -36,7 +36,6 @@ namespace Nz
|
||||
*
|
||||
* \remark Produces a NazaraAssert if buffer is invalid
|
||||
*/
|
||||
|
||||
inline ByteArray& MemoryStream::GetBuffer()
|
||||
{
|
||||
NazaraAssert(m_buffer, "Invalid buffer");
|
||||
@@ -50,7 +49,6 @@ namespace Nz
|
||||
*
|
||||
* \remark Produces a NazaraAssert if buffer is invalid
|
||||
*/
|
||||
|
||||
inline const ByteArray& MemoryStream::GetBuffer() const
|
||||
{
|
||||
NazaraAssert(m_buffer, "Invalid buffer");
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Mutex
|
||||
*/
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ObjectRef
|
||||
* \brief Core class that represents a reference to an object
|
||||
*/
|
||||
@@ -20,7 +21,6 @@ namespace Nz
|
||||
*
|
||||
* \remark Produces a NazaraError if object not found
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
ObjectRef<Type> ObjectLibrary<Type>::Get(const String& name)
|
||||
{
|
||||
@@ -35,7 +35,6 @@ namespace Nz
|
||||
* \brief Checks whether the library has the object with that name
|
||||
* \return true if it the case
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
bool ObjectLibrary<Type>::Has(const String& name)
|
||||
{
|
||||
@@ -48,7 +47,6 @@ namespace Nz
|
||||
* \param name Name of the object
|
||||
* \param object Object to stock
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
void ObjectLibrary<Type>::Register(const String& name, ObjectRef<Type> object)
|
||||
{
|
||||
@@ -61,7 +59,6 @@ namespace Nz
|
||||
*
|
||||
* \param name Name of the object
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
ObjectRef<Type> ObjectLibrary<Type>::Query(const String& name)
|
||||
{
|
||||
@@ -77,7 +74,6 @@ namespace Nz
|
||||
*
|
||||
* \param name Name of the object
|
||||
*/
|
||||
|
||||
template<typename Type>
|
||||
void ObjectLibrary<Type>::Unregister(const String& name)
|
||||
{
|
||||
@@ -87,7 +83,7 @@ namespace Nz
|
||||
template<typename Type>
|
||||
bool ObjectLibrary<Type>::Initialize()
|
||||
{
|
||||
return true; // Que faire
|
||||
return true; // Nothing to do
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::ObjectRef
|
||||
* \brief Core class that represents a reference to an object
|
||||
*/
|
||||
@@ -15,7 +16,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Constructs a ObjectRef object by default
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef() :
|
||||
m_object(nullptr)
|
||||
@@ -27,7 +27,6 @@ namespace Nz
|
||||
*
|
||||
* \param object Pointer to handle like a reference (can be nullptr)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(T* object) :
|
||||
m_object(object)
|
||||
@@ -41,7 +40,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef to assign into this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(const ObjectRef& ref) :
|
||||
m_object(ref.m_object)
|
||||
@@ -55,7 +53,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef of type U to convert to type T
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
ObjectRef<T>::ObjectRef(const ObjectRef<U>& ref) :
|
||||
@@ -68,7 +65,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef to move into this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::ObjectRef(ObjectRef&& ref) noexcept :
|
||||
m_object(ref.m_object)
|
||||
@@ -79,7 +75,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Destructs the object (remove a reference to the object when shared)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::~ObjectRef()
|
||||
{
|
||||
@@ -91,7 +86,6 @@ namespace Nz
|
||||
* \brief Gets the underlying pointer
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::Get() const
|
||||
{
|
||||
@@ -102,7 +96,6 @@ namespace Nz
|
||||
* \brief Checks whether the reference is valid
|
||||
* \return true if reference is not nullptr
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
bool ObjectRef<T>::IsValid() const
|
||||
{
|
||||
@@ -113,7 +106,6 @@ namespace Nz
|
||||
* \brief Releases the handle of the pointer
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::Release()
|
||||
{
|
||||
@@ -130,7 +122,6 @@ namespace Nz
|
||||
* \brief Resets the content of the ObjectRef with another pointer
|
||||
* \return true if old handle is destroyed
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
bool ObjectRef<T>::Reset(T* object)
|
||||
{
|
||||
@@ -154,7 +145,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef to swap
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::Swap(ObjectRef& ref)
|
||||
{
|
||||
@@ -169,7 +159,6 @@ namespace Nz
|
||||
*
|
||||
* \see IsValid
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::operator bool() const
|
||||
{
|
||||
@@ -180,7 +169,6 @@ namespace Nz
|
||||
* \brief Dereferences the ObjectRef
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>::operator T*() const
|
||||
{
|
||||
@@ -191,20 +179,18 @@ namespace Nz
|
||||
* \brief Dereferences the ObjectRef
|
||||
* \return Underlying pointer
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* ObjectRef<T>::operator->() const
|
||||
{
|
||||
return m_object;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Assigns the object into this
|
||||
* \return A reference to this
|
||||
*
|
||||
* \param object Pointer to handle like a reference (can be nullptr)
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(T* object)
|
||||
{
|
||||
@@ -219,7 +205,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref The other ObjectRef
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(const ObjectRef& ref)
|
||||
{
|
||||
@@ -234,7 +219,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef of type U to convert
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(const ObjectRef<U>& ref)
|
||||
@@ -252,7 +236,6 @@ namespace Nz
|
||||
*
|
||||
* \param ref ObjectRef to move in this
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
ObjectRef<T>& ObjectRef<T>::operator=(ObjectRef&& ref) noexcept
|
||||
{
|
||||
@@ -267,12 +250,12 @@ namespace Nz
|
||||
namespace std
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Gives a hash representation of the object, specialisation of std
|
||||
* \return Hash of the ObjectRef
|
||||
*
|
||||
* \param object Object to hash
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
struct hash<Nz::ObjectRef<T>>
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::PrimitiveList
|
||||
* \brief Core class that represents a geometric primitive
|
||||
*/
|
||||
@@ -19,7 +20,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeBox(const Vector3f& lengths, const Vector3ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -38,7 +38,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeBox(const Vector3f& lengths, const Vector3ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeBox(lengths, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -53,7 +52,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCone(float length, float radius, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -74,7 +72,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the cone
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCone(float length, float radius, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeCone(length, radius, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -88,7 +85,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCubicSphere(float size, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -108,7 +104,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the cubic sphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeCubicSphere(float size, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeCubicSphere(size, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -122,7 +117,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeIcoSphere(float size, unsigned int recursionLevel, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -142,7 +136,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the icosphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeIcoSphere(float size, unsigned int recursionLevel, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeIcoSphere(size, recursionLevel, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -156,7 +149,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -174,7 +166,6 @@ namespace Nz
|
||||
* \param planeInfo Information for the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Planef& planeInfo, const Rectf& uvCoords)
|
||||
{
|
||||
MakePlane(size, subdivision, Matrix4f::Transform(planeInfo.distance * planeInfo.normal, Quaternionf::RotationBetween(Vector3f::Up(), planeInfo.normal)), uvCoords);
|
||||
@@ -189,7 +180,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakePlane(const Vector2f& size, const Vector2ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakePlane(size, subdivision, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -204,7 +194,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
matrix = transformMatrix;
|
||||
@@ -226,7 +215,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline void Primitive::MakeUVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
MakeUVSphere(size, sliceCount, stackCount, Matrix4f::Transform(position, rotation), uvCoords);
|
||||
@@ -241,7 +229,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Box(const Vector3f& lengths, const Vector3ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -260,7 +247,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Box(const Vector3f& lengths, const Vector3ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -279,7 +265,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Cone(float length, float radius, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -299,7 +284,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the cone
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Cone(float length, float radius, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -317,7 +301,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::CubicSphere(float size, unsigned int subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -336,7 +319,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the cubic sphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::CubicSphere(float size, unsigned int subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -354,7 +336,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::IcoSphere(float size, unsigned int recursionLevel, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -373,7 +354,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the icosphere
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::IcoSphere(float size, unsigned int recursionLevel, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -391,7 +371,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -409,7 +388,6 @@ namespace Nz
|
||||
* \param planeInfo Information for the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Planef& plane, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -428,7 +406,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the plane
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::Plane(const Vector2f& size, const Vector2ui& subdivision, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -447,7 +424,6 @@ namespace Nz
|
||||
* \param transformMatrix Matrix to apply
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::UVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Matrix4f& transformMatrix, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
@@ -467,7 +443,6 @@ namespace Nz
|
||||
* \param rotation Rotation of the box
|
||||
* \param uvCoords Coordinates for texture
|
||||
*/
|
||||
|
||||
inline Primitive Primitive::UVSphere(float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f& position, const Quaternionf& rotation, const Rectf& uvCoords)
|
||||
{
|
||||
Primitive primitive;
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::ResourceLoader<Type, Parameters>
|
||||
* \ingroup core
|
||||
* \class Nz::ResourceLoader
|
||||
* \brief Core class that represents a loader of resources
|
||||
*/
|
||||
|
||||
@@ -22,7 +23,6 @@ namespace Nz
|
||||
*
|
||||
* \param extension Extension of the file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::IsExtensionSupported(const String& extension)
|
||||
{
|
||||
@@ -52,7 +52,6 @@ namespace Nz
|
||||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromFile(Type* resource, const String& filePath, const Parameters& parameters)
|
||||
{
|
||||
@@ -171,7 +170,6 @@ namespace Nz
|
||||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromMemory(Type* resource, const void* data, unsigned int size, const Parameters& parameters)
|
||||
{
|
||||
@@ -268,7 +266,6 @@ namespace Nz
|
||||
* \remark Produces a NazaraWarning if loader failed
|
||||
* \remark Produces a NazaraError if all loaders failed or no loader was found
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceLoader<Type, Parameters>::LoadFromStream(Type* resource, Stream& stream, const Parameters& parameters)
|
||||
{
|
||||
@@ -336,7 +333,6 @@ namespace Nz
|
||||
* \param fileLoader Optional function to load the data from a file in the resource
|
||||
* \param memoryLoader Optional function to load the data from a raw memory in the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceLoader<Type, Parameters>::RegisterLoader(ExtensionGetter extensionGetter, StreamChecker checkFunc, StreamLoader streamLoader, FileLoader fileLoader, MemoryLoader memoryLoader)
|
||||
{
|
||||
@@ -368,7 +364,6 @@ namespace Nz
|
||||
* \param fileLoader Optional function to load the data from a file in the resource
|
||||
* \param memoryLoader Optional function to load the data from a raw memory in the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceLoader<Type, Parameters>::UnregisterLoader(ExtensionGetter extensionGetter, StreamChecker checkFunc, StreamLoader streamLoader, FileLoader fileLoader, MemoryLoader memoryLoader)
|
||||
{
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::ResourceManager<Type, Parameters>
|
||||
* \ingroup core
|
||||
* \class Nz::ResourceManager
|
||||
* \brief Core class that represents a resource manager
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Clears the content of the manager
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Clear()
|
||||
{
|
||||
@@ -30,7 +30,6 @@ namespace Nz
|
||||
*
|
||||
* \param filePath Path to the asset that will be loaded
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
ObjectRef<Type> ResourceManager<Type, Parameters>::Get(const String& filePath)
|
||||
{
|
||||
@@ -63,7 +62,6 @@ namespace Nz
|
||||
* \brief Gets the defaults parameters for the load
|
||||
* \return Default parameters for loading from file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
const Parameters& ResourceManager<Type, Parameters>::GetDefaultParameters()
|
||||
{
|
||||
@@ -73,7 +71,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Purges the resource manager from every asset whose it is the only owner
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Purge()
|
||||
{
|
||||
@@ -97,7 +94,6 @@ namespace Nz
|
||||
* \param filePath Path for the resource
|
||||
* \param resource Object to associate with
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Register(const String& filePath, ObjectRef<Type> resource)
|
||||
{
|
||||
@@ -111,7 +107,6 @@ namespace Nz
|
||||
*
|
||||
* \param params Default parameters for loading from file
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::SetDefaultParameters(const Parameters& params)
|
||||
{
|
||||
@@ -123,7 +118,6 @@ namespace Nz
|
||||
*
|
||||
* \param filePath Path for the resource
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Unregister(const String& filePath)
|
||||
{
|
||||
@@ -136,7 +130,6 @@ namespace Nz
|
||||
* \brief Initializes the resource manager
|
||||
* \return true
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
bool ResourceManager<Type, Parameters>::Initialize()
|
||||
{
|
||||
@@ -146,7 +139,6 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Uninitialize the resource manager
|
||||
*/
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
void ResourceManager<Type, Parameters>::Uninitialize()
|
||||
{
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>
|
||||
* \ingroup core
|
||||
* \class Nz::Signal
|
||||
* \brief Core class that represents a signal, a list of objects waiting for its message
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...> object by default
|
||||
* \brief Constructs a Signal object by default
|
||||
*/
|
||||
|
||||
template<typename... Args>
|
||||
@@ -24,7 +25,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...> object by move semantic
|
||||
* \brief Constructs a Signal object by move semantic
|
||||
*
|
||||
* \param signal Signal to move in this
|
||||
*/
|
||||
@@ -240,12 +241,12 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>::Connection
|
||||
* \class Nz::Signal::Connection
|
||||
* \brief Core class that represents a connection attached to a signal
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::Connection object with a slot
|
||||
* \brief Constructs a Signal::Connection object with a slot
|
||||
*
|
||||
* \param slot Slot of the listener
|
||||
*/
|
||||
@@ -293,12 +294,12 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \class Nz::Signal<Args...>::ConnectionGuard
|
||||
* \class Nz::Signal::ConnectionGuard
|
||||
* \brief Core class that represents a RAII for a connection attached to a signal
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::ConnectionGuard object with a connection
|
||||
* \brief Constructs a Signal::ConnectionGuard object with a connection
|
||||
*
|
||||
* \param connection Connection for the scope
|
||||
*/
|
||||
@@ -310,7 +311,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Signal<Args...>::ConnectionGuard object with a connection by move semantic
|
||||
* \brief Constructs a Signal::ConnectionGuard object with a connection by move semantic
|
||||
*
|
||||
* \param connection Connection for the scope
|
||||
*/
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \class Nz::SparsePtr<T>
|
||||
* \ingroup core
|
||||
* \class Nz::SparsePtr
|
||||
* \brief Core class that represents a pointer and the step between two elements
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object by default
|
||||
* \brief Constructs a SparsePtr object by default
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
@@ -23,7 +24,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object with a pointer
|
||||
* \brief Constructs a SparsePtr object with a pointer
|
||||
*
|
||||
* \param ptr Pointer to data
|
||||
*/
|
||||
@@ -35,7 +36,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object with a pointer and a step
|
||||
* \brief Constructs a SparsePtr object with a pointer and a step
|
||||
*
|
||||
* \param ptr Pointer to data
|
||||
* \param stride Step between two elements
|
||||
@@ -48,7 +49,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a SparsePtr<T> object from another type of SparsePtr
|
||||
* \brief Constructs a SparsePtr object from another type of SparsePtr
|
||||
*
|
||||
* \param ptr Pointer to data of type U to convert to type T
|
||||
*/
|
||||
@@ -214,7 +215,7 @@ namespace Nz
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
T* SparsePtr<T>::operator->() const
|
||||
T* SparsePtr::operator->() const
|
||||
{
|
||||
return reinterpret_cast<T*>(m_ptr);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Constructs a Stream object with options
|
||||
*
|
||||
* \param streamOptions Options for the stream
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \brief Constructs a String object with a shared string by move semantic
|
||||
*
|
||||
* \param sharedString Shared string to move into this
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::TaskScheduler
|
||||
* \brief Core class that represents a thread pool
|
||||
*/
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
namespace Nz
|
||||
{
|
||||
/*!
|
||||
* \ingroup core
|
||||
* \class Nz::Thread
|
||||
* \brief Core class that represents a thread
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a function
|
||||
* \brief Constructs a Thread object with a function
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
*/
|
||||
@@ -25,7 +26,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a function and its parameters
|
||||
* \brief Constructs a Thread object with a function and its parameters
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
* \param args Arguments of the function
|
||||
@@ -38,7 +39,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Thread<T> object with a member function and its object
|
||||
* \brief Constructs a Thread object with a member function and its object
|
||||
*
|
||||
* \param function Task the thread will execute in parallel
|
||||
* \param object Object on which the method will be called
|
||||
|
||||
Reference in New Issue
Block a user