SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::rtti::RttiBase Class Referenceabstract

The abstract class used as base for the RTTI data. More...

#include <RttiBase.h>

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

Public Member Functions

 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
 
virtual std::vector< RttiBase * > parents ()=0
 
virtual bool isSubTypeOf (const RttiBase *potential_parent_type)=0
 Checks if the current RTTI inherits from a specific parent.
 

Detailed Description

The abstract class used as base for the RTTI data.

Member Function Documentation

◆ className()

std::string spark::rtti::RttiBase::className ( ) const
nodiscard
Returns
The current class name as a string

◆ isSubTypeOf()

virtual bool spark::rtti::RttiBase::isSubTypeOf ( const RttiBase * potential_parent_type)
nodiscardpure virtual

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

Implemented in spark::rtti::Rtti< Type, BaseTypes >.

◆ parents()

virtual std::vector< RttiBase * > spark::rtti::RttiBase::parents ( )
nodiscardpure virtual
Returns
The RTTI information of all the parents for the current type

Implemented in spark::rtti::Rtti< Type, BaseTypes >.