AspectC++

AspectC++

AspectC++ is an aspect-oriented extension of C and C++ languages. It is based on source-to-source translation, translating AspectC++ source code to C++. It is available under the GNU GPL, though some extensions specific to Microsoft Windows are only available through pure-systems GmbH.

Aspect-oriented programming allows modularizing cross-cutting concerns in a single module, an aspect.Aspects can modify existing classes, but most commonly they provide 'advice' that runs before, after, or aroundexisting functionality.

For example, if we want to trace all calls to an API call, rather than inserting 'cerr' or print statements in many places,we can create a single aspect that will accomplish this:aspect Tracer{ advice call("% %Iter::Reset(...)") : before() { cerr << "about to call Iter::Reset for " << JoinPoint::signature() << endl; ;

The Tracer aspect above will print out a message before any call to %Iter::Reset. The %Iter syntaxmeans that it will match all classes that end in Iter.

Each 'matched' location in the source code is called a joinpoint -- the advice is joined to (or advises) that code.AspectC++ provides a joinpoint API to provide and access to information about the joinpoint. For example, the function:JoinPoint::signature()returns the name of the method (that matched %Iter::Reset) that is about to be called.

The joinpoint API also provides compile-time type information that can be used within anaspect to access the type or the value of the arguments and the return type and return value of amethod or function.

In addition to the documentation and tutorials at the AspectC++ website (external link below), you can also findarticles on Aspect-oriented programming and AspectC++ at past AOSD conferences [http://www.aosd.net] .

External links

* [http://www.aspectc.org/ AspectC++]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Aspect-oriented programming — (AOP) is a programming paradigm that increases modularity by allowing the separation of cross cutting concerns.Separation of concerns entails breaking down a program into distinct parts (so called concerns , cohesive areas of functionality). All… …   Wikipedia

  • Aspekt-orientierte Programmierung — Die Artikel Aspektorientierte Programmierung und Cross Cutting Concern überschneiden sich thematisch. Hilf mit, die Artikel besser voneinander abzugrenzen oder zu vereinigen. Beteilige dich dazu an der Diskussion über diese Überschneidungen.… …   Deutsch Wikipedia

  • Aspektorientierung — Die Artikel Aspektorientierte Programmierung und Cross Cutting Concern überschneiden sich thematisch. Hilf mit, die Artikel besser voneinander abzugrenzen oder zu vereinigen. Beteilige dich dazu an der Diskussion über diese Überschneidungen.… …   Deutsch Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

  • AspectJ — Paradigm(s) aspect oriented Appeared in 2001 (2001) Developer Eclipse Foundation Stable release 1.6.11 (March 15, 2011; 7 months ago …   Wikipedia

  • Cross-cutting concern — In computer science, cross cutting concerns are aspects of a program which affect other concerns. These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation, and can result in either… …   Wikipedia

  • Social commentary — is the act of rebelling against a government by means of rhetorical propaganda. This is most often done with the idea of implementing or promoting change by informing the general populace about a given problem and appealing to people s sense of… …   Wikipedia

  • Programmation Orientée Aspect — La programmation orientée aspect (POA, en anglais aspect oriented programming AOP) est un paradigme de programmation qui permet de séparer les considérations techniques (aspect en anglais) des descriptions métier dans une application. Par exemple …   Wikipédia en Français

  • Programmation orientee aspect — Programmation orientée aspect La programmation orientée aspect (POA, en anglais aspect oriented programming AOP) est un paradigme de programmation qui permet de séparer les considérations techniques (aspect en anglais) des descriptions métier… …   Wikipédia en Français

  • Programmation orientée aspect — La programmation orientée aspect (POA, en anglais aspect oriented programming AOP) est un paradigme de programmation qui permet de séparer les préoccupations transverses ((en) en:Cross cutting concern). Les préoccupations transverses sont des… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”