C ++中面向方面的编程 - 当前支持的替代方法 [英] Aspect Oriented Programming in C++ - Current supported alternatives

查看:228
本文介绍了C ++中面向方面的编程 - 当前支持的替代方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java之前使用过AspectJ,我最近考虑过检查C ++语言存在哪些可能性。



我听说过 AspectC ++ ,但不同的AspectJ,AspectC ++似乎从21.12.2005最新发布日期,根据他们的网站在这个意义上被抛弃<。 / p>

我不知道是否有当前正在使用或现在开发的任何最近的替代品,并且仍然支持并具有连续的更新与进化,并且如果任何这些替代品的出现有某种整合插件为Eclipse IDE中更容易使用。



在,有没有,有没有从AspectC一些最棘手的限制++,我应该事件

解决方案



<

AspectC ++是一个值得尝试,但作为一个大学项目,它并不奇怪,它没有继续积极的发展;当启动研究生离开,这样的项目往往失去势头巨额资金。



面向方面编程是一种特殊类型的程序转化(找到与此条件匹配的地点('pointcut'),并对该地点的代码执行此操作)。所以,如果你有一个程序转换工具,你可以很容易地模拟AOP。要在C ++上做转换,你需要一个强大的C ++前端,以及能够转换和重新生成代码。 OpenC ++是一个做C ++转换的项目,其中的转换纯粹是程序化的AST转换,程序化的AST修改。一个特定的问题与C ++的方言由OpenC ++处理;特别是,我不确定OpenC ++处理C +的模板或完整的常用方言(GCC,MS);



我们的 DMS软件重构工具包是通过语言定义参数化的通用程序转换。它有对C ++的GCC和MS方言的强大定义。您可以实现程序的转换程序上为OpenC的++一样,或者更方便您可以编写源到源模式定向转换(或者更通常,这些混合来实现复杂的效果)。 DMS已被用于开展大规模的C ++代码
大规模重组(见的案例分析:重新设计C ++通过自动程序转换组件模型)。 DMS是积极维护,但它是商业。



编辑2015年3月:现在C ++ 14在GCC和MS方言。


I have used AspectJ before for Java, and I recently have thought about checking which possibilities exist for the C++ language.

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

I wonder if there are any more recent alternatives currently being used or developed nowadays, and which are still supported and having continuous updates and evolution, and also if any of such alternatives happen to have some sort of integration plugin for easier use within the Eclipse IDE.

In the event that there aren't, are there some most problematic limitations from AspectC++ that I should be aware of before considering to use it?

Thanks in advance.

解决方案

AspectC++ was a worthy try but as a university project it isn't surprising that it hasn't continued active development; when the initiating graduate students leave, such projects tend to lose huge amounts of momentum.

Aspect-oriented programming is a just a special kind of program transformation ("find places that match this condition ('pointcut') and do this to the code at that place"). So, if you have a program transformation tool, you can emulate AOP pretty easily. To do transformation on C++ you need a strong C++ front end and as well as abililty to transform and regenerate code. OpenC++ was a project to do C++ transformations, where the transformations are coded purely as procedural AST-walks with procedural AST modifications. A particular issue had to do with which dialect of C++ was handled by OpenC++; in particular, I'm not sure OpenC++ handled templates or full common dialects (GCC, MS) of C+; however I have no direct experience with it, just a keen aficionado of such tools.

Our DMS Software Reengineering Toolkit is a general purpose program transformation parameterized by language definitions. It has robust definitions for GCC and MS dialects of C++. You can implement program transformations procedurally as OpenC++ does, or more conveniently you can write source-to-source pattern-directed transformations (or more usually, mix these to achieve complex effects). DMS has been used to carry out massive restructuring of large scale C++ codes (see Case study: Re-engineering C++ component models via automatic program transformation ). DMS is actively maintained, but it is commercial.

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

这篇关于C ++中面向方面的编程 - 当前支持的替代方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆