SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::rtti::Rtti< Type, BaseTypes > Class Template Referencefinal

The RTTI object containing all the needed data. More...

#include <Rtti.h>

Inheritance diagram for spark::rtti::Rtti< Type, BaseTypes >:
spark::rtti::RttiBase

Public Types

using ParentTypes = mpl::typelist<BaseTypes...>
 

Public Member Functions

 Rtti (std::string class_name)
 
std::vector< RttiBase * > parents () override
 
bool isSubTypeOf (const RttiBase *potential_parent_type) override
 Checks if the current RTTI inherits from a specific parent.
 
- Public Member Functions inherited from spark::rtti::RttiBase
 RttiBase (std::string class_name)
 
 RttiBase (const RttiBase &other)=default
 
 RttiBase (RttiBase &&other) noexcept=default
 
RttiBaseoperator= (const RttiBase &other)=default
 
RttiBaseoperator= (RttiBase &&other) noexcept=default
 
std::string className () const
 

Static Public Member Functions

static Rttiinstance ()
 

Detailed Description

template<typename Type, typename... BaseTypes>
class spark::rtti::Rtti< Type, BaseTypes >

The RTTI object containing all the needed data.

Template Parameters
TypeThe type we want to get the RTTI data
BaseTypesThe parent types of type Type

Member Function Documentation

◆ instance()

template<typename Type , typename... BaseTypes>
Rtti< Type, BaseTypes... > & Rtti< Type, BaseTypes >::instance ( )
static
Returns
The rtti instance for the current Type and BaseTypes

◆ isSubTypeOf()

template<typename Type , typename... BaseTypes>
bool Rtti< Type, BaseTypes >::isSubTypeOf ( const RttiBase * potential_parent_type)
nodiscardoverridevirtual

Checks if the current RTTI inherits from a specific parent.

Parameters
potential_parent_typeThe parent type we want to check
Returns
True if the potentialParentType is in one of the parents, else False

Implements spark::rtti::RttiBase.

◆ parents()

template<typename Type , typename... BaseTypes>
std::vector< RttiBase * > Rtti< Type, BaseTypes >::parents ( )
nodiscardoverridevirtual
Returns
The RTTI information of all the parents for the current type

Implements spark::rtti::RttiBase.