zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    字符串去特定字符
    字符串的查找删除
    输出梯形
    元素节点的 innerText、innerHTML、outerHTML、outerText
    JavaScript DOM 特殊集合Collection
    Collection 访问方式
    JS Browser BOM
    异常
    JCBD
    try-with-resources 方式关闭注意事项
  • 原文地址:https://www.cnblogs.com/cutepig/p/9514886.html
Copyright © 2011-2022 走看看