属性和放大器;反射库C ++? [英] Attribute & Reflection libraries for C++?

查看:81
本文介绍了属性和放大器;反射库C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最成熟的C ++项目似乎有一个自己的反射和属性系统,即定义可以通过字符串进行访问,并自动序列化的属性。我至少参加了许多C ++项目似乎推倒重来

Most mature C++ projects seem to have an own reflection and attribute system, i.e for defining attributes which can be accessed by string and are automatically serializable. At least many C++ projects I participated in seemed to reinvent the wheel.

你知道任何的优秀的开源库作为C ++支持反射和属性容器,具体是:

Do you know any good open source libraries for C++ which support reflection and attribute containers, specifically:


  • 定义RTTI,并通过宏属性

  • 访问RTTI,并通过code属性

  • 属性自动序列

  • 倾听属性修改(例如OnValueChanged)

推荐答案

您可以看看下面的两个工具。我从来没有使用其中任何一个,所以我不能告诉你他们如何(IM)实际是。

You could have a look at the two tools below. I've never used either of them, so I can't tell you how (im)practical they are.

XRTTI

XRTTI:

Xrtti是一个工具和伴随ç延伸C的标准运行时类型系统++库++提供了更丰富的类和方法来操作这些类及其成员反射信息。

Xrtti is a tool and accompanying C++ library which extends the standard runtime type system of C++ to provide a much richer set of reflection information about classes and methods to manipulate these classes and their members.

OpenC的++

OpenC++:

OpenC的++是C ++前端库(词法分析器+ + DOM / MOP)和源到源翻译。 OpenC的++实现的C ++语言工具,扩展,领域特定的编译器优化和运行时元对象协议的开发。

OpenC++ is C++ frontend library (lexer+parser+DOM/MOP) and source-to-source translator. OpenC++ enables development of C++ language tools, extensions, domain specific compiler optimizations and runtime metaobject protocols.

这篇关于属性和放大器;反射库C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆