简体   繁体   English

C ++类层次结构=>到XSD模式? 有人知道工具或示例吗?

[英]C++ classes hierarchy => to XSD schema? Anyone know tool or example?

I know that I could convert XSD schema to C++ classes using codesynthesis mechanism. 我知道我可以使用代码合成机制将XSD架构转换为C ++类。 What about vice versa? 反之亦然呢?

Lets say I have a very difficult class hierarchy in C++ and I would like to get XSD schema, so I could use it by any other language in future? 可以说我在C ++中有一个非常困难的类层次结构,并且我想获取XSD模式,以便将来可以在其他任何语言中使用它吗?

I don't know about any ready-made tool but clang provides an interface to the AST produced from C++ sources. 我不知道任何现成的工具,但是clang提供了从C ++源产生的AST的接口。 It would be possible to create suitable tool on the basis of this this AST. 可以基于此AST创建合适的工具。

There is also gccxml which represents, at least, the declarations found in a C++ using XML. 还有gccxml ,它至少表示使用XML在C ++中找到的声明。 However, I haven't used gccxml and I don't know if it is still maintained. 但是,我还没有使用过gccxml,也不知道它是否仍在维护。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM