Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Austin Brunkhorst
@AustinBrunkhorst
Hey guys! I'll be posting some design updates pretty soon.
louis-mclaughlin
@louis-mclaughlin
Hey @AustinBrunkhorst are you still working on this?
Austin Brunkhorst
@AustinBrunkhorst
@louis-mclaughlin I'm not currently working on this but I will be revisiting when I get some free time (hopefully soon).
Robbin Marcus
@RobbinMarcus
Hey @AustinBrunkhorst it seems your blog is offline, I can't reach: http://blog.austinbrunkhorst.com/cpp-reflection-part-1/
Do you have an alternative? Thanks!
Austin Brunkhorst
@AustinBrunkhorst
@RobbinMarcus I finally took the time to migrate the blog! It should be live.
Robbin Marcus
@RobbinMarcus
Cool, works. Thanks!
JayD
@JayDT
Hi @AustinBrunkhorst. I have modification for your reflection project. I'm use for Native C++ Wpf like user interface. https://github.com/JayDT/XUI/tree/master/src/Reflection
Implemented template class reflection and modular per dynamic library, output files reworked but not the most beautiful.
JayD
@JayDT
If you have a problem with a project I'm correcting it, this is my first hobby project
Austin Brunkhorst
@AustinBrunkhorst
@JayDT Very cool! It's great to see someone using this project as a reference :smile:. Template classes were a feature I was interested in implementing, but never got around to.
Klimenko Valeria
@ValeriaKlimenko_twitter
Hi @AustinBrunkhorst!
I am familiarizing with the CPP Reflection tool and have to say this is a great job, I am very excited of it. This is like real reflection which is so missing in C++.
I am trying to use it in my project, where I have to extract meta data from third party header files. And I noticed that cmake script requires header and source files. Is it possible to specify only header files and generate meta data based on them?
Austin Brunkhorst
@AustinBrunkhorst
@ValeriaKlimenko_twitter source files are not required. What CMake file were you referring to?
Klimenko Valeria
@ValeriaKlimenko_twitter

Thank you for your answer)
I was referring this cmake example (https://blog.austinbrunkhorst.com/cpp-reflection-part-1/#cmakeprebuildexample) where "set(PROJECT_SOURCE_FILES ...)" line has confused me, which source files need to specify. But now everything is pretty clear. I've checked the MetaParser on my test types and it is working! Awesome!

The only thing I am curious is whether it's possible to get meta data from headers, where Meta(Enabled) is not specified. For example for third party API headers.
Thank you!

Austin Brunkhorst
@AustinBrunkhorst

@ValeriaKlimenko_twitter sorry for the delayed response. In order to avoid generating a ton of code, I initially decided to go with a whitelisting approach for types. We ran into problems where 3rd party types needed to be known about, so I added an "external type" feature. I haven't formally documented it, but you just have to make a declaration like this:

MetaExternal(boost::filesystem::path);

You can find an example here - https://github.com/AustinBrunkhorst/Ursine3D/blob/master/Source/Ursine3D/include/UrsineReflectionExternal.h

Types declared with MetaExternalare only registered with the type system, so fields, methods, etc. aren't included. There is definitely a clear use case for non whitelisted types like you're looking for. An easy way to support this would be adding a command line option in the parser that disables type whitelisting. At that point, you could have a project that generates all of your third party types separately from your main project for modularity.

LanguageTypes/Class - would need to update isAccessible() to return true when the command line option is configured.

gavrmg
@gavrmg
Hello @AustinBrunkhorst. I am not shure it is an appropriate place to ask questions, but still. How does to handle the library handle templated containers like boost::container::vector<T>?
gavrmg
@gavrmg
Solved
gavrmg
@gavrmg
I implemented Type::GetDecayedType() by adding 4th param to TypeInfo::Register function and appropriately fixing the .mustache files. Is it allright to send a pull request?
Austin Brunkhorst
@AustinBrunkhorst
Hey @gavrmg - nice to hear you got the templated containers working! It's more than alright to send out a PR. In fact, I am looking forward to it :)
gavrmg
@gavrmg
Fine, will do. Currently working on templated classes
gavrmg
@gavrmg
Well, it fails spectacularly on non-copyable types. Move-constructor of VariantContainer class somehow calls copy-constructor of type