使用非虚拟析构函数查找基类的类列表的 CQL 约束?
是否可以使用 cppdepend (是的 C++)来执行相当于 Scott Meyers 在他的 非常古老的 C++ 分析工具比较?
我可以用查询列出方法
SELECT TOP 100 METHODS WHERE !IsVirtual AND IsDestructor
我需要的是一个嵌套查询,它允许我通过方法约束类型,反之亦然,我认为这也会回答 这个问题。
虚构的语法可能类似于
SELECT TOP 100 METHODS WHERE !IsVirtual AND IsDestructor AND
MethodClass IN TYPES WHERE NbChildren > 0
or
SELECT TOP 100 METHODS
OUT OF TYPES (WHERE NbChildren > 0)
WHERE !IsVirtual AND IsDestructor
Is it possible to use cppdepend (yes C++) to do the equivalent of Make destructors virtual in base classes as Scott Meyers discussed in his very old comparison of C++ analysis tools?
I can list methods with a query
SELECT TOP 100 METHODS WHERE !IsVirtual AND IsDestructor
What I need is like a nested query that allows me to constrain types by methods or vice versa, which is what I think would also answer this question.
Imaginary syntax might be like
SELECT TOP 100 METHODS WHERE !IsVirtual AND IsDestructor AND
MethodClass IN TYPES WHERE NbChildren > 0
or
SELECT TOP 100 METHODS
OUT OF TYPES (WHERE NbChildren > 0)
WHERE !IsVirtual AND IsDestructor
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于不支持当前嵌套查询的 CQL,这是不可能的。
NDepend 的下一个主要版本(将于 2012 年上半年发布)将允许您编写此类查询。
This is no possible yet with CQL that doesn't support currently nested queries.
The next major version of NDepend, (to be release during the first half of 2012), will let you write this kind of query.