AOP++: A Generic Aspect-Oriented Programming Framework in C++

  • Zhen Yao
  • Qi-long Zheng
  • Guo-liang Chen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3676)


This paper presents AOP++, a generic aspect-oriented programming framework in C++. It successfully incorporates AOP with object-oriented programming as well as generic programming naturally in the framework of standard C++. It innovatively makes use of C++ templates to express pointcut expressions and match join points at compile time. It innovatively creates a full-fledged aspect weaver by using template metaprogramming techniques to perform aspect weaving. It is notable that AOP++ itself is written completely in standard C++, and requires no language extensions. With the help of AOP++, C++ programmers can facilitate AOP with only a little effort.


Type Pattern Class Class Language Extension Component Code Method Pattern 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, V., Loingtier, J., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  2. 2.
    McNamara, B., Smaragdakis, Y.: Functional Programming in C++. In: Proceedings of the ACM SIGPLAN ICFP 2000 (2000)Google Scholar
  3. 3.
    The Boost Lambda Library,
  4. 4.
    The Boost Type Traits Library,
  5. 5.
    Austern, M.: Generic Programming and the STL: using and extending the C++ Standard Template Library. Addison-Wesley Longman Publishing Co., Inc., Amsterdam (1998)Google Scholar
  6. 6.
    Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, Reading (2001)Google Scholar
  7. 7.
    Spinczyk, O., Gal, A., Schröder-Preikschat, W.: AspectC++: An Aspect-Oriented Extension to the C++ Programming Language. In: Proceedings of TOOLS 2002 (2002)Google Scholar
  8. 8.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)Google Scholar
  9. 9.
    Stepanov, A., Lee, M.: The Standard Template Library. HP Technical Report HPL-94-34 (1995)Google Scholar
  10. 10.
    The Boost C++ Metaprogramming Library,
  11. 11.
    The Boost Array Library,
  12. 12.
    Czarnecki, K., Eisenecker, U.: Generative Programming: Methods, Tools, and Applications. Addison-Wesley, Reading (2000)Google Scholar
  13. 13.
    AspectJ. Home Page,
  14. 14.
    Coplien, J.: Multi-Paradigm Design for C++. Addison-Wesley, Reading (1998)Google Scholar
  15. 15.
    Bryant, A., Catton, A., Volder, K., Murphy, G.: Explicit Programming. In: Proceedings of AOSD 2002 (2002)Google Scholar
  16. 16.
    Diggins, C.: Aspect-oriented programming & C++. Dr Dobbs Journal 29(8) (2004)Google Scholar
  17. 17.
    Gal, A., Lohmann, D., Spinczyk, O.: Aspect-Oriented Programming with C++ and AspectC++. In: Tutorial held on AOSD 2004 (2004)Google Scholar
  18. 18.
    Smaragdakis, Y., Batory, D.: Mixin-Based Programming in C++. In: Butler, G., Jarzabek, S. (eds.) GCSE 2000. LNCS, vol. 2177, p. 163. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  19. 19.
    Veldhuizen, T., Gannon, D.: Active libraries: Rethinking the roles of compilers and libraries. In: Proceedings of the SIAM Workshop on Object Oriented Methods for Inter-operable Scientific and Engineering Computing (OO 1998). SIAM Press, Philadelphia (1998)Google Scholar
  20. 20.
    Veldhuizen, T.: Using C++ template metaprograms. C++ Report 7(4) (1995)Google Scholar
  21. 21.
    Sunder, S., Musser, D.: A Metaprogramming Approach to Aspect Oriented Programming in C++. In: MPOOL 2004, ECOOP 2004 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Zhen Yao
    • 1
  • Qi-long Zheng
    • 1
  • Guo-liang Chen
    • 1
  1. 1.National High Performance Computing Center at Hefei, Department of Computer Science and TechnologyUniversity of Science and Technology of ChinaHefeiChina

Personalised recommendations