{"id":523,"date":"2010-10-08T17:38:27","date_gmt":"2010-10-08T16:38:27","guid":{"rendered":"http:\/\/www.nuonsoft.com\/blog\/?p=523"},"modified":"2010-10-08T17:38:27","modified_gmt":"2010-10-08T16:38:27","slug":"analyze-your-c-code-using-cppdepend","status":"publish","type":"post","link":"https:\/\/www.nuonsoft.com\/blog\/2010\/10\/08\/analyze-your-c-code-using-cppdepend\/","title":{"rendered":"Analyze Your C++ Code Using CppDepend"},"content":{"rendered":"<p>CppDepend is a tool that you can use to analyze your C\/C++ code. I gave it a try and it&#8217;s pretty powerful. CppDepends has support for 60 different code metrics. It has something called Code Query Language (CQL) that allows you to perform queries on your code like the following:<\/p>\n<ul>\n<li>Which public methods have more than 30 lines of code? <br \/>\n SELECT METHODS  WHERE NbLinesOfCode >  30  AND IsPublic <\/li>\n<li>Which classes derive From CBase? <br \/>\n SELECT TYPES WHERE IsClass AND DeriveFrom &#8220;CBase&#8221; <\/li>\n<li>Which methods have been refactored recently ? <br \/>\n SELECT METHODS WHERE CodeWasChanged <\/li>\n<\/ul>\n<p>It can generate several different kind of graphical representations of your code, for example:<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.nuonsoft.com\/images\/blog\/CppDepend\/DiagramAbstracnessVSInstabilitySmall.png\" class=\"alignnone\" width=\"136\" height=\"130\" \/> <img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.nuonsoft.com\/images\/blog\/CppDepend\/DiagramBoxAndArrowGraphSmall.png\" class=\"alignnone\" width=\"135\" height=\"122\" \/> <img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.nuonsoft.com\/images\/blog\/CppDepend\/Poster800x800Small.png\" class=\"alignnone\" width=\"120\" height=\"120\" \/> <img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.nuonsoft.com\/images\/blog\/CppDepend\/PosterDependencies1Small.png\" class=\"alignnone\" width=\"164\" height=\"119\" \/><\/p>\n<p>I think this tool will help a lot when working on a new code base to understand the structure of the code.<\/p>\n<p>Here is a description from the vendor:<\/p>\n<p><strong>Improve your code base quality.<\/strong><br \/>\nCppDepend is a tool that simplifies managing a complex C\/C++ (Native,Mixed and COM) code base. Architects and developers can analyze code structure, specify design rules, do effective code reviews and master evolution by comparing different versions of the code.<\/p>\n<p><strong>Refactor and Improve your design and architecture.<\/strong><br \/>\nCppDepend provides useful graphs to analyze your design and architecture. CQL language gives you a flexibility to create your custom queries and have a deep view of your code base.<\/p>\n<p><strong>Assist your migration.<\/strong><br \/>\nUnderstanding the existing code base is primordial before any migration. CppDepend helps you in your migration process.<\/p>\n<p><a href=\"http:\/\/www.cppdepend.com\/\" target=\"blank\">Visit the CppDepend site.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CppDepend is a tool that you can use to analyze your C\/C++ code. I gave it a try and it&#8217;s pretty powerful. CppDepends has support for 60 different code metrics. It has something called Code Query Language (CQL) that allows you to perform queries on your code like the following: Which public methods have more [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,17],"tags":[99],"class_list":["post-523","post","type-post","status-publish","format-standard","hentry","category-c","category-software-development","tag-cppdepend"],"_links":{"self":[{"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":7,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"predecessor-version":[{"id":538,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/posts\/523\/revisions\/538"}],"wp:attachment":[{"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nuonsoft.com\/blog\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}