Programming Help by Programmer's hub

Aspect C++ Programming Help

Aspect C++ is an Aspect oriented programming (AOP) language which aims to create the modularity of the programs. The program is written in a aspect C++ code and with the help of source-to-source compiler translate the aspect C++ code in to the compliable C++. Aspect-Oriented Programming provides convenient methods to separate architecturally cross-cutting concerns, such as logging, into modularized aspects.

Example Aspect C++

aspect Tracer
{ 
   advice call("% %Iter::Reset(...)") : before()
   {
      cerr << "about to call Iter::Reset for " << JoinPoint::signature() << endl;
   }
};

Aspect C++ Concepts

  • Crosscutting Concern
  • Aspect
  • Join Point
  • Pointcut
  • Pointcut Expression
  • Aspect
  • Advice
  • Join Point API
 

Advantages of Aspect oriented programming

  • Property-Based Pointcut Designators
  • Generalized Type Names
  • Flexibility
  • abstraction-level
  • Portability

On Web