Virtual namespace functions: an alternative to virtual member functions in C++ and advice in AspectC++

  • Authors:
  • Christian Heinlein

  • Affiliations:
  • University of Ulm, Germany

  • Venue:
  • Proceedings of the 2005 ACM symposium on Applied computing
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Virtual namespace functions (VNFs) are introduced as C++ functions defined at global or namespace scope which can be redefined similar to virtual member functions. Even though this is a relatively simple concept, hardly more complex than ordinary C functions, it is shown that VNFs subsume object-oriented single, multiple, and predicate-based method dispatch as well as aspect-oriented before, after, and around advice. Their implementation by means of a "lazy" precompiler for C++ is briefly described.