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 ...
随机推荐
- nginx配置文服
修改nginx.conf 添加如下内容 autoindex on; # 显示目录 autoindex_exact_size on; # 显示文件大小 autoindex_localtime on; # ...
- 中文datepicker控件
$(function() { $.datepicker.regional[, isRTL: !, showMonthAfterYear: !, yearSuffix: "年" } ...
- nginx防DOS攻击
将 timeout 设低来防止 DOS 攻击 client_body_timeout 10; client_header_timeout 10; keepalive_timeout 5 5; send ...
- 选择器(&伪)/盒模型
一.选择器高级 1.组合选择器: /*群主选择器 : 同时可以控制多个选择器*/ /*#dd,div,#a{}*/ /* d{ 起相同类名 color: red; }*/ 举例: .d1,.d2,.d ...
- eclipse逆向生成hibernate的实体类(注解和配置文件)
eclipse从数据库逆向生成Hibernate实体类(注解和配置文件) 分类: hibernate 数据库 java 2011-10-22 21:28 2915人阅读 评论(8) 收藏 举报 做项目 ...
- java数组排序(插入排序、冒泡排序、选择排序)与递归 代码示例
import java.util.Scanner; public class OrderBy { public static void main(String[] args) { // Scanner ...
- js获取当天零点的时间戳
var now_date = new Date();//获取Date对象now_date.setHours(0);//设置小时now_date.setMinutes(0);//设置分钟now_date ...
- apache php upload file
/********************************************************************************* * apache php uplo ...
- 【CSP】字符与int
[转自https://yq.aliyun.com/articles/19153] WIKIOI-1146 ISBN号码 光仔december 2014-03-01 16:20:00 浏览479 评 ...
- day 019 常用模块
主要内容: 1模块的简单认识 2collection模块 3time时间模块 4random模块 5os模块 6sys模块 一 模块的简单认识 引入模块的方式: 1import (常见方式) 2 ...