Documentation for module 'NDK'

Former-commit-id: 63e1cac538c577a1f1aafa71fa7eef69a6d4daab [formerly b2d8769fd02a0e7d9c476d4ad7be1988a1fd6789] [formerly 636b5cb79bcb8da44d9aa45ba1023565bcf29f0d [formerly a2361ec2b8679d4d4ba096e543b5d4b91825dd62]]
Former-commit-id: d402d35477f9db0135c553d55c401939426bf62d [formerly 607336ea0f42731e4604f3a8c2df06f3aecfc401]
Former-commit-id: 69e23cd6c06723486de5e4641ce810012dac66da
This commit is contained in:
Gawaboumga
2016-08-21 13:48:52 +02:00
parent 42abd200be
commit 9eba331f34
75 changed files with 3374 additions and 112 deletions

View File

@@ -6,7 +6,15 @@
namespace Ndk
{
///TODO: constexpr avec le C++14
/*!
* \ingroup NDK
* \brief Builds a component id based on a name
* \return Identifier for the component
*
* \param name Name to generate id from
*/
///TODO: constexpr with the C++14
template<unsigned int N>
ComponentId BuildComponentId(const char (&name)[N])
{
@@ -19,18 +27,38 @@ namespace Ndk
return componentId;
}
/*!
* \ingroup NDK
* \brief Gets the component id of a component
* \return Identifier for the component
*/
template<typename ComponentType>
ComponentIndex GetComponentIndex()
{
return ComponentType::componentIndex;
}
/*!
* \ingroup NDK
* \brief Gets the system id of a system
* \return Identifier for the system
*/
template<typename SystemType>
SystemIndex GetSystemIndex()
{
return SystemType::systemIndex;
}
/*!
* \ingroup NDK
* \brief Initializes the a component
* \return Identifier for the component
*
* \param name Name to generate id from
*/
template<typename ComponentType, unsigned int N>
ComponentIndex InitializeComponent(const char (&name)[N])
{
@@ -38,6 +66,12 @@ namespace Ndk
return ComponentType::componentIndex;
}
/*!
* \ingroup NDK
* \brief Initializes the a system
* \return Identifier for the system
*/
template<typename SystemType>
SystemIndex InitializeSystem()
{
@@ -45,12 +79,26 @@ namespace Ndk
return SystemType::systemIndex;
}
/*!
* \brief Checks whether the parameter is a component
* \return true If it is the case
*
* \param component Component to check
*/
template<typename ComponentType, typename C>
bool IsComponent(C& component)
{
return component.GetIndex() == GetComponentIndex<ComponentType>();
}
/*!
* \brief Checks whether the parameter is a system
* \return true If it is the case
*
* \param system System to check
*/
template<typename SystemType, typename S>
bool IsSystem(S& system)
{