You.i Engine
YiIsBaseOf< BASE, DERIVED > Class Template Reference

Detailed Description

template<typename BASE, typename DERIVED>
class YiIsBaseOf< BASE, DERIVED >

Template trait utility that checks if a specific type is a base of another type. This trait can be used in templated functions and classes to perform static assertions, or in template specializations to enable/disable specific implementations.

CV qualifiers are ignored. For example, 'const CYISceneNode' is considered to be a base of 'CYISceneView'.
A base of a base of a type is considered to be a base of that type. This function does not distinguish between direct bases and bases of bases.
For the purposes of this function, a type is considered to be a base of itself. This is to implement an 'is a' check, rather than a true 'does this type have this base' check.
void is not considered a base of any type, and is considered to have no bases.


template<typename T>
static bool IsSceneNodeType()
return isSceneNode;

#include <utility/YiTypeTraits.h>

Static Public Attributes

static const bool value

Member Data Documentation

◆ value

template<typename BASE , typename DERIVED >
const bool YiIsBaseOf< BASE, DERIVED >::value

The result of the comparison. The value token will have a value of either true or false.

The documentation for this class was generated from the following file: