-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alternative class hierarchy registration to avoid RTTR_ENABLE #5
Comments
The reason why I didn't implemented that way is, RTTR does not depend on rtti. So the macro No question, I would like to remove the macro, but then RTTR has to use rtti to retrieve the actual type (I think with some kind of mapping type_info objects to Or do you know a way to retrieve the actual type of a base class without rtti? |
No RTTI is needed for You likewise don't need the macro for type lookup in general. There are certain features it will be needed for, but those features should be opt-in. For instance, if I don't need polymorphic
And then the actual All of this is quite possible, and very much game engine friendly, I assure you; all three of the bugs I filed are informed by ways in which RTTR falls short of the reflection engine we use in our large commercial game engine. :) |
Maybe I have to improve the documentation about this macro. However, when you are working with class hierarchies. You should use the macro. That way, you can invoke properties, with the base class or whatever your current type is.
Lets say I have the slight feeling that we are talking past each other. Btw. all your three issues are no bugs, that are future requests 😉 |
Gotcha. Indeed, polymorphic queries are the only case it should be required, as you describe. I'm fine with this request being closed then. :) |
As
RTTR_ENABLE
is intrusive to the class it cannot be used with third-party types.An alternative approach I use is to add a
.base_class<T>()
member function to the registration interface. This allows a user to manually add base classes to a type when they are not able to - or don't want to - modify a class definition.The text was updated successfully, but these errors were encountered: