SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
Rtti.h
1#pragma once
2
3#include "spark/rtti/RttiBase.h"
4
5#include "spark/mpl/typelist.h"
6
7namespace spark::rtti
8{
14 template <typename Type, typename... BaseTypes>
15 class Rtti final : public RttiBase
16 {
17 public:
18 using ParentTypes = mpl::typelist<BaseTypes...>;
19
20 public:
21 explicit Rtti(std::string class_name);
22
26 static Rtti& instance();
27
28 [[nodiscard]] std::vector<RttiBase*> parents() override;
29
30 [[nodiscard]] bool isSubTypeOf(const RttiBase* potential_parent_type) override;
31 };
32}
33
34#include "spark/rtti/impl/Rtti.h"
The abstract class used as base for the RTTI data.
Definition RttiBase.h:16
The RTTI object containing all the needed data.
Definition Rtti.h:16
std::vector< RttiBase * > parents() override
Definition Rtti.h:20
bool isSubTypeOf(const RttiBase *potential_parent_type) override
Checks if the current RTTI inherits from a specific parent.
Definition Rtti.h:26
static Rtti & instance()
Definition Rtti.h:13
Definition typelist.h:8