meta/template/class_proxy_include.inja

42 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-03-04 18:21:58 +08:00
#pragma once
#ifndef META_GEN_{{class_name}}_PROXY_H
#define META_GEN_{{class_name}}_PROXY_H
2024-03-05 00:13:53 +08:00
#include "test.h"
2024-03-04 18:21:58 +08:00
2024-03-05 00:13:53 +08:00
// namespace meta {
// namespace reflection {
2024-03-04 18:21:58 +08:00
2024-03-05 00:13:53 +08:00
class ::{{class_namespace}}::{{class_name}}::{{class_name}}_Class : public ::meta::reflection::Class {
public:
{{class_name}}_Class();
static void Register();
private:
void AddBaseClassProxy(std::shared_ptr<::meta::reflection::Class> base) ;
void AddMethodProxy(std::shared_ptr<::meta::reflection::Method> method) ;
void AddFieldProxy(std::shared_ptr<::meta::reflection::Field> field) ;
2024-03-04 18:21:58 +08:00
};
2024-03-05 00:13:53 +08:00
class ::{{class_namespace}}::{{class_name}}::{{class_name}}_Field : public ::meta::reflection::Field {
2024-03-04 18:21:58 +08:00
public:
{{class_name}}_Field(const std::string& name, std::shared_ptr<::meta::reflection::Class> parent);
protected:
::meta::reflection::any GetImpl(void* instance) const override;
void SetImpl(void* instance, const ::meta::reflection::any& value) const override;
};
2024-03-05 00:13:53 +08:00
class ::{{class_namespace}}::{{class_name}}::{{class_name}}_Method : public ::meta::reflection::Method {
2024-03-04 18:21:58 +08:00
public:
{{class_name}}_Method(const std::string& name, std::shared_ptr<::meta::reflection::Class> parent);
protected:
2024-03-05 00:13:53 +08:00
::meta::reflection::any InvokeImpl(void* instance, const std::vector<::meta::reflection::any> &params) const override;
2024-03-04 18:21:58 +08:00
};
2024-03-05 00:13:53 +08:00
// } // namespace reflection
// } // namespace meta
2024-03-04 18:21:58 +08:00
#endif // META_GEN_{{class_name}}_PROXY_H