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 = ;
bool ok;
std::string aaa = aa.convert<std::string>(&ok); // OK
string_wrapper bbb = aa.convert<string_wrapper>(&ok); //Fail
C++ dynamic reflection的更多相关文章
- An Introduction to Reflection in C++
Apr 13, 2017 Stop me if you’ve heard this one before. You are working on a messaging middleware, a g ...
- Spring.Net 能为我们做点什么
本文内容 概述 背景 模块 使用场景 入门应用 Spring.NET 相关项目 本文正式开始前,我以目前所能想到的.此时此刻能想到的,先简单说下,为什么会有像 Spring.Net 这样的东西.首先, ...
- OpenGL的版本号历史和发展
来源请注明.本文永久地址为http://www.cnblogs.com/vertexshader/articles/2917540.html OpenGL®作为业界最为广泛使用的2D和3D图形接口标准 ...
- 当类型为dynamic的视图模型遭遇匿名对象
当年在ASP.NET MVC 1.0时代我提到,在开发时最好将视图的Model定制为强类型的,这样可以充分利用静态检查功能进行排错.不过有人指出,这么做虽然易于静态检查,但是定义强类型的Model类型 ...
- 不一样的dynamic解析json 万能方法
写过javascript的人都知道js解析json 1:(JSON) 字符串转换为对象. var str = '{"name":"lsw","hobb ...
- 代替Reflection(反射)的一些方法
Reflection(反射)是深入学习.Net必须掌握的技能之一.最初学Reflection的时候,的确是被惊住了,原来还可以这样.只要给你一个Assembly, 你就能获取到其中所有的类型,根据类型 ...
- var和dynamic的区别及如何正确使用dynamic ?
C#中的很多关键词用法比较容易混淆,var和dynamic就是其中一组,他们都可以申明动态类型的变量,但是本质上他们还是有不少区别的.var 在编译阶段已经确定类型,在初始化时候,必须提供初始化的值, ...
- [Java Basics2] Iterable, Socket, Reflection, Proxy, Factory DP
Parent interface of Collection: Iterable Interface A class that implements the Iterable can be used ...
- 使用dynamic动态设置属性值与反射设置属性值性能对比
static void Main(string[] args) { int times = 1000000; string value = "Dynamic VS Reflection&qu ...
随机推荐
- tensorflow-LSTM-网络输出与多隐层节点
本文从tensorflow的代码层面理解LSTM. 看本文之前,需要先看我的这两篇博客 https://www.cnblogs.com/yanshw/p/10495745.html 谈到网络结构 ht ...
- 牛客多校第五场 F take
链接:https://www.nowcoder.com/acm/contest/143/F来源:牛客网 题目描述 Kanade has n boxes , the i-th box has p[i] ...
- Codeforces Round #485 (Div. 2) C题求三元组(思维)
C. Three displays time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- 对象存储到session中
以前在使用java开发中,通常都是在session里面存放的对象.在使用php开发中,也打算在session中存入对象,确实能把对象放进去,也能把整个对象输出,但就是取不出对象里面的属性. 通过pri ...
- Linux运维命令总结(-)
Linux运维命令总结(-) 此次整理linux运维常用命令13个,常用linux运维命令大概有150个,约占百分之十,大牛见笑,本人菜鸟一枚不才整理如下,如有不正确之处,请多多指正. 1.创建目录 ...
- [转]skynet Lua中的协程
Lua中的协程 http://www.outsky.org/code/lua-coroutine.html Sep 6, 2014 Lua中的协程和其他变量一样,都是第一类值(first-class ...
- Mac 终端添加代码到SVN
从SVN拉取代码步骤: 1.cd /Users/mark/zkh/Work/BC/(本地路径) 2.svn checkout https://192.168.2.99/svn/bc_android ...
- Unity 3D观察者设计模式-C#委托和事件的运用
C#观察者设计模式 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Chinar -- 心分享.心创新! ...
- Spark各个版本新特性
后续会添加spark生态系统中各个组件的兼容支持情况... Spark2.0.0 * 2016-07-27正式发布 * 它是2.x版本线的上的第一个版本. * 300位contributors的超过2 ...
- Prism for WPF
Prism for WPF Prism for WPF初探(构建简单的模块化开发框架) 先简单的介绍一下Prism框架,引用微软官方的解释: Prism provides guidance to ...