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 ...
随机推荐
- IntelliJ IDEA导入Javax包(servlet-api.jar)
在初次使用 IntelliJ IDEA 中,当你使用javax.servlet包下的类时(例:javax.servlet.http.HttpServlet), 在你会发现在IntelliJ IDEA里 ...
- 90%会搞错的JavaScript闭包问题
由工作中演变而来的面试题 这是一个我工作当中的遇到的一个问题,似乎很有趣,就当做了一道题去面试,发现几乎没人能全部答对并说出原因,遂拿出来聊一聊吧. 先看题目代码: function fun(n,o) ...
- postman工具测试接口
本篇文章主要介绍怎么在postman工具中进行接口的测试? 从以下几个方面进行介绍: 1.先介绍下接口测试 2.不同类型的接口请求方式如何在postman中进行测试 1.1 接口 什么是接口? 接口一 ...
- background低版本安卓浏览器不支持复合属性,要分开写
background:url("http://..../xxx.jpg") no-repeat center/cover; 这种复合形式在有些低端安卓浏览器中不支持,最好分开写: ...
- to linux
apt-get update // 更新 apt sudo apt-get install git // 安装git git clone git://github.com/yyuu/pyenv.git ...
- [转载] About Career Promotion and Tutoring from Zhihu Web FAQer (Quoted Entirely Without Personal Idea. Delete Immediately If Pirated)
问题: 如何下列各类公司的互联网IT类工作待遇排名? 下列各公司岗位待遇序号从小到大依次降低: 美国互联网总部special offer(15万刀起薪) : 股份制银行总行,证券公司,基金公司IT部门 ...
- ___security_cookie机制
.text:00411500 ; int __cdecl wmainCRTStartup().text:00411500 _wmainCRTStartup proc near ...
- android_rooting_tools 项目介绍(CVE-2012-4220)
android_rooting_tools是GITHUB上的一个Android内核漏洞提权项目,包含多套内核漏洞的exploit代码: EXPLOIT CVE 简单描述 libdiagexploit ...
- swing的弹出窗口
swing作为基础的图形化显示界面开发,还是新手小难上手的一个项目学习,当然做好了之后的数据流转是对编程架构的很大提高. 这里我介绍一下swing的弹出窗口,作为界面交互的时候不可或缺的检测工具,简直 ...
- pandas apply()函数参数 args
#!/usr/bin/python import pandas as pd data = {'year':[2000,2001,2002,2001,2002],'value':[1.5,1.7,3.6 ...