开发者

CQL constraint of list of classes to find bases with non-virtual destructors?

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 o开发者_如何学Cr 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜