Generating game engine boilerplate #879
-
I've been following this project with interest. One thing I do is work with C++ and game engines. One thing that a they have in common is boilerplate that a class needs to implement to work in the engine. This is often accomplished with macros and sometimes with custom code generation passes. In cppfront I could see parts of this being accomplish with custom metafuctions.
But there is another part that I'm not sure how the current cppfront would help with the boilerplate. This involves exporting properties/methods to be visible in the editor or scripting language. Example from Godot that uses template magic and macros.
It would be nice if the Custom attributes that could be queried by the metafunction?
A tagging though the method name where the name is rewritten? 😱
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
From the error messages in the code Herb wants to make metafunctions available on nearly everything. Line 8050 in 2d9382d So it would be possible to write:
|
Beta Was this translation helpful? Give feedback.
Even with only a type metafunction, you can use an alias for
std::type_identity_t
namedgodot_property
that@godot_class
can observe.