C++ dynamic reflection

相关想法以及lib

Lua 有想过用reflection实现lua binding,但没想过反过来
moc依赖于qt的lib,不考虑了
https://github.com/rttrorg/rttr VS2013 build ok
http://preshing.com/20180116/a-primitive-reflection-system-in-cpp-part-1/
https://github.com/chakaz/reflang
http://www.extreme.indiana.edu/reflcpp/
http://preshing.com/20180124/a-flexible-reflection-system-in-cpp-part-2/
http://www.cs.sjsu.edu/faculty/pearce/modules/lectures/oop/types/reflection/prototype.htm
Dispatch COM
https://chinbilly.blogspot.com/2016/03/ponder-c-reflection.html
http://cpgf.org/document/index.html
http://donw.io/post/reflection-cpp-1/
http://www.vollmann.com/en/pubs/meta/meta/meta.html
https://github.com/Manu343726/siplasplas uses a libclang based script to generate C++ code with all the metadata.
https://svn.boost.org/svn/boost/sandbox/mirror/doc/html/mirror.html#mirror.intro

 

相关测试

类型转换测试rttr

class string_wrapper {
    std::string s_;
public:
    string_wrapper(std::string s="") :s_(s) {
    }
};

    variant aa = 123;
    bool ok;
    std::string aaa = aa.convert<std::string>(&ok);    // OK

    string_wrapper bbb = aa.convert<string_wrapper>(&ok);    //Fail

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值