Global and Local Virtual Functions in C++

被引:0
|
作者
Heinlein, Christian [1 ]
机构
[1] Univ Ulm, Dept Comp Sci, Ulm, Germany
来源
JOURNAL OF OBJECT TECHNOLOGY | 2005年 / 4卷 / 10期
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Global virtual functions (GVFs) are introduced as C++ functions defined at global or namespace scope which can be redefined later similar to virtual member functions. Even though GVFs are a relatively simple concept, hardly more complex than ordinary C functions, it is shown that they subsume object-oriented single, multiple, and predicate-based method dispatch as well as aspect-oriented before, after, and around advice. Furthermore, the well-known "expression problem"can be solved in a simple and natural way. Local virtual functions are a straightforward extension of GVFs allowing temporary redefinitions during the execution of some other function or part of it. Amongst others, this is quite useful to simulate "cflow join points"of aspect-oriented languages. The implementation of global and local virtual functions by means of a precompiler for C++ is briefly described.
引用
收藏
页数:23
相关论文
共 50 条
  • [31] C++
    Koenig, Andrew
    Moo, Barbara E.
    JOOP - Journal of Object-Oriented Programming, 1999, 12 (01):
  • [32] C++
    Koenig, Andrew
    JOOP - Journal of Object-Oriented Programming, 1997, 10 (07):
  • [33] C++
    Koenig, Andrew
    JOOP - Journal of Object-Oriented Programming, 1998, 11 (02):
  • [34] Standard C/C++: Testing C++ library conformance
    Plauger, P.J.
    C/C++ Users Journal, 2000, 18 (04):
  • [35] C++
    Koenig, Andrew
    1998, (11):
  • [36] C++
    JOOP - Journal of Object-Oriented Programming, 1998, 10 (09):
  • [37] C++ for ...
    Stevens, A
    DR DOBBS JOURNAL, 1999, 24 (08): : 99 - 101
  • [38] C++
    JOOP J Object Oriented Program, 3 (71):
  • [39] Local and Global Evaluation Functions for Computational Evolution
    Han, Jing
    COMPLEX SYSTEMS, 2005, 15 (04): : 307 - 347