转载 C++ 的“反射”技术
来源:互联网 发布:父与子的编程之旅 pdf 编辑:程序博客网 时间:2024/05/20 04:12
原址: http://www.cppblog.com/tx7do/archive/2006/09/05/12034.html
Lit Window Library
来自http://sourceforge.net/projects/litwindow 大概看了一下,使用了宏建立了一个比较复杂的数据结构,用来提供成员反查以及成员访问。
tinybind
来自http://sourceforge.net/projects/tinybind/ 这个应该不算是反射,不过通过了定义一个Binding函数实现成员和XML的Element之间的绑定,自动实现了XML<->class,对实现C++的“反射”也有一定的参考作用。
OODBC
来自http://www.garret.ru/~knizhnik/cpp.html 这个也应该不算是反射,也是通过宏建立一个记录成员变量在类中的偏移位置的链表。自动实现数据库字段与成员的绑定,有点Hibernate的味道。呵呵。同时,作者提供的另外几个例如FastDB、GigaBase、goods、POST++都使用了类似的技术。
http://www.codeproject.com/library/libreflection.asp
AGM::LibReflection: A reflection library for C++.
用的是宏,不过实现出来的东西比较有“反射”的味道,而且只需要一个头文件就足够了。不知道g++下表现如何,有空要研究研究。
boost出了1.32,去 http://boost.c-view.org/ 可以找到。
其中新增加的部分有:
- Assignment Library: Filling containers with constant or generated data has never been easier, from Thorsten Ottosen.
- Minmax Library: Standard library extensions for simultaneous min/max and min/max element computations, from Hervé Brönnimann.
- Multi-index Containers Library: Containers with multiple STL-compatible access interfaces, from Joaquín M López Muñoz.
- Numeric Conversion Library: Optimized policy-based numeric conversions, from Fernando Cacciola.
- Program Options Library: Access to configuration data given on command line, in config files and other sources, from Vladimir Prus.
- Range Library: A new infrastructure for generic algorithms that builds on top of the new iterator concepts, from Thorsten Ottosen.
- Serialization Library: Serialization/de-serialization of arbitrary C++ data structures to various formats including text, binary, and xml, from Robert Ramey.
- String Algorithms Library: Collection of string related algorithms for case conversion, trimming, find/replace operations and more, from Pavol Droba.
- Tribool: 3-state boolean type library, from Doug Gregor.
其中的 Multi-index Containers Library 还是比较有特色,其他的大部分倒是在其他地方也看到过,可能是那些作者加入了boost了吧,没功夫细究了。
0 0
- 转载 C++ 的“反射”技术
- 又一个C 的反射技术
- C/C++反射技术的替代方案
- C#--反射技术
- C++ 的“反射”技术
- 反射的技术实践
- Java的反射技术
- java的反射技术
- java 的反射技术
- 神奇的反射技术
- 反射技术的浅析
- 反射的技术
- [转载] MFC技术注意第62条的翻译:Windows 控件的消息反射
- 转载的笔记(反射)
- 有关反射的总结(转载)
- 反射的机制讲解,转载
- 转载:提问的技术
- 反射技术与工厂方法 (using C#)
- android 从matrix获取处理过的图片的实际宽度
- linux grep-管道命令
- mybatis-interceptor:Spring动态拦截器
- MongoDB基本管理命令
- C# Invoke
- 转载 C++ 的“反射”技术
- Android 5.1 编译
- SAT考试之SAT词汇记忆4步走
- kpush部署过程中遇到的问题
- iOS 二维码最简单的Zbar集成
- 判断一个物体播放没播放“Play”动画
- java反编译
- Mongodb数据分片的维护(新增分片到已有的分片复制集)
- Spring整合struts2的action的默认作用域