Abstract
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.
The work of this paper is funded by Intel HiEd HPC Research Project under grant 4507146713, and Science Foundation of Anhui, China under grant 050420205.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
McNamara, B., Smaragdakis, Y.: Functional Programming in C++. In: Proceedings of the ACM SIGPLAN ICFP 2000 (2000)
The Boost Lambda Library, http://www.boost.org/libs/lambda/
The Boost Type Traits Library, http://www.boost.org/libs/type_traits/
Austern, M.: Generic Programming and the STL: using and extending the C++ Standard Template Library. Addison-Wesley Longman Publishing Co., Inc., Amsterdam (1998)
Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, Reading (2001)
Spinczyk, O., Gal, A., Schröder-Preikschat, W.: AspectC++: An Aspect-Oriented Extension to the C++ Programming Language. In: Proceedings of TOOLS 2002 (2002)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)
Stepanov, A., Lee, M.: The Standard Template Library. HP Technical Report HPL-94-34 (1995)
The Boost C++ Metaprogramming Library, http://www.boost.org/libs/mpl/
The Boost Array Library, http://www.boost.org/libs/array/
Czarnecki, K., Eisenecker, U.: Generative Programming: Methods, Tools, and Applications. Addison-Wesley, Reading (2000)
AspectJ. Home Page, http://www.aspectj.org/
Coplien, J.: Multi-Paradigm Design for C++. Addison-Wesley, Reading (1998)
Bryant, A., Catton, A., Volder, K., Murphy, G.: Explicit Programming. In: Proceedings of AOSD 2002 (2002)
Diggins, C.: Aspect-oriented programming & C++. Dr Dobbs Journal 29(8) (2004)
Gal, A., Lohmann, D., Spinczyk, O.: Aspect-Oriented Programming with C++ and AspectC++. In: Tutorial held on AOSD 2004 (2004)
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)
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)
Veldhuizen, T.: Using C++ template metaprograms. C++ Report 7(4) (1995)
Sunder, S., Musser, D.: A Metaprogramming Approach to Aspect Oriented Programming in C++. In: MPOOL 2004, ECOOP 2004 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Yao, Z., Zheng, Ql., Chen, Gl. (2005). AOP++: A Generic Aspect-Oriented Programming Framework in C++. In: Glück, R., Lowry, M. (eds) Generative Programming and Component Engineering. GPCE 2005. Lecture Notes in Computer Science, vol 3676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561347_8
Download citation
DOI: https://doi.org/10.1007/11561347_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29138-1
Online ISBN: 978-3-540-31977-1
eBook Packages: Computer ScienceComputer Science (R0)