Skip to content

struct RTTI

我的需求: 当面对非常多的struct的时候,如果能够使用tool来自动地解析这些struct,然后生成对应的类型信息,这将极大地提升效率。

Parse c++ header file

Google:

1、parse c++ header file

2、C/C++ header file parser

下面是检索的有价值的结果:

senexcanis CppHeaderParser

1、这是Google parse c++ header file的第一个返回结果。

2、https://pypi.org/project/CppHeaderParser/

3、我最终选择了这个library

4、借助它,实现了一个auxiliary compiler,生成struct RTTI

thegreenplace Parsing C++ in Python with Clang

stackoverflow Is there a good Python library that can parse C++? [closed]

github gccxml

Library

library visit_struct

library magic_get

github baszalmstra header-parser

github Leandros metareflect

foonathan cppast

Posts

meetingcpp Building a C++ Reflection System

duriansoftware Self-aware struct-like types in C++11

stackoverflow How can I add reflection to a C++ application?

eliben llvm-clang-samples

cwoodall Reflection in C++ to Generate Serializable Structs Using libclang and Python

stackoverflow C++ JSON Serialization

https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented