Aspect Oriented C ++ Programming - Current Supported Alternatives

I used AspectJ before for Java, and recently I was thinking about checking what features exist for the C ++ language.

I heard about AspectC ++ , but unlike AspectJ, AspectC ++ seems abandoned in the sense that the latest release dates from 12/21/2005, according to their website.

I wonder if there are currently any more modern alternatives that are currently being used or are being developed and which are still supported and constantly updated and evolving, as well as if any of these alternatives has some kind of integration plugin for easier use inside the Eclipse IDE.

If not, are there some of the most problematic AspectC ++ limitations that I should know about before considering using it?

Thanks in advance.

+4
source share
2 answers

Aspect ++ was a worthy attempt, but university projects do not often continue, because products are usually not reliable, original scientists lose interest and graduate students who build it. This is similar to the case when I wrote this answer in 2010. To my surprise, AspectC ++ still seems to be actively developing in 2017. If you only need aspects for C ++, this is probably worth a look.

Aspect-oriented programming is just a special kind of program transformation ("find places matching this condition (" pointcut "and do it with code in that place"). So, if you have a software conversion tool, you can easily emulate AOP. To convert to C ++, you need a strong C ++ interface, as well as the ability to convert and restore code. OpenC ++ was a C ++ conversion project where transformations are encoded exclusively as procedural AST walks with procedural AST modifications. A particular problem was that the C ++ dialect was handled by OpenC ++; in particular, I'm not sure if the templates processed with OpenC ++ or the complete common dialects (GCC, MS) are C +; however, I do not have direct experience with him, just a keen fan of such tools.

Our DMS Software Reengineering Toolkit is a universal program transformation parameterized by language definitions. It has robust definitions for GCC and C ++ MS dialects . You can implement software transformations procedurally, as OpenC ++ does, or, more conveniently, you can write source-oriented transformations with source code (or, more often, mix them to achieve complex effects). DMS is used to carry out large-scale restructuring of large-scale C ++ codes (see Example: reconstructing models of C ++ components using automatic program conversion ). DMS is actively supported, but commercially.

EDIT March, 2015: Now C ++ 14 in GCC and MS dialects.

EDIT July 2017: now C ++ 17 in the GCC and MS dialog box.

+6
source

All Articles