CSEngine
Loading...
Searching...
No Matches
ReflectionRef.h
1
#pragma once
2
3
#include <string>
4
#include <cstring>
5
#include "ReflectionObject.h"
6
7
namespace
CSE {
8
template
<
class
T>
9
class
ReflectionRef
{
10
public
:
11
explicit
ReflectionRef
(std::string type) : m_class(std::move(type)) {}
12
explicit
ReflectionRef
() {
13
const
char
* type = T::GetClassStaticType();
14
m_class = type;
15
}
16
17
~ReflectionRef
() =
default
;
18
19
bool
IsSameClass(
const
ReflectionObject
*
object
)
const
{
20
if
(
object
==
nullptr
)
return
false
;
21
return
std::strcmp(m_class.c_str(), object->GetClassType()) == 0;
22
}
23
24
private
:
25
std::string m_class;
26
};
27
}
CSE::ReflectionObject
Definition
ReflectionObject.h:9
CSE::ReflectionRef
Definition
ReflectionRef.h:9
Object
Base
ReflectionRef.h
Generated on Thu Sep 18 2025 14:35:37 for CSEngine by
1.12.0