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 条
  • [1] UNDERSTANDING C++ OVERLOADED FUNCTIONS
    KOENIG, A
    JOURNAL OF OBJECT-ORIENTED PROGRAMMING, 1992, 5 (06): : 67 - 69
  • [2] The Lambda Library:: unnamed functions in C++
    Järvi, J
    Powell, G
    Lumsdaine, A
    SOFTWARE-PRACTICE & EXPERIENCE, 2003, 33 (03): : 259 - 291
  • [3] Developing a tool for memoizing functions in C++
    McNamee, P
    Hall, M
    ACM SIGPLAN NOTICES, 1998, 33 (08) : 17 - 22
  • [4] LOCAL++: A C++ framework for local search algorithms
    Schaerf, A
    Cadoli, M
    Lenzerini, M
    SOFTWARE-PRACTICE & EXPERIENCE, 2000, 30 (03): : 233 - 257
  • [5] LOCAL++: A C++ framework for local search algorithms
    Schaerf, Andrea
    Lenzerini, Maurizio
    Cadoli, Marco
    Proceedings of the Conference on Technology of Object-Oriented Languages and Systems, TOOLS, 1999, : 152 - 161
  • [6] LOCAL++: A C++ framework for local search algorithms
    Schaerf, A
    Lenzerini, M
    Cadoli, M
    TOOLS 29: TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS, PROCEEDINGS, 1999, 29 : 152 - 161
  • [7] The direct cost of virtual function calls in C++
    Driesen, K
    Holzle, U
    ACM SIGPLAN NOTICES, 1996, 31 (10) : 306 - 323
  • [8] Compiler optimization of C++ virtual function calls
    Porat, S
    Bernstein, D
    Fedorov, Y
    Rodrigue, J
    Yahav, E
    PROCEEDINGS OF THE SECOND USENIX CONFERENCE ON OBJECT-ORIENTED TECHNOLOGIES AND SYSTEMS (COOTS), 1996, : 3 - 14
  • [9] Virtual test system based on Visual C++
    Ding, Lipei
    Guo, Xiaosong
    Zhu, Zhi
    ICEMI 2007: PROCEEDINGS OF 2007 8TH INTERNATIONAL CONFERENCE ON ELECTRONIC MEASUREMENT & INSTRUMENTS, VOL II, 2007, : 276 - 278
  • [10] Embedding a C/C++ interpreter into virtual instruments for script blocks
    Duan, Hong
    Cheng, Harry H.
    DETC2007: PROCEEDINGS OF THE ASME INTERNATIONAL DESIGN ENGINEERING TECHNOLOGY CONFERENCE AND COMPUTERS AND INFORMATION IN ENGINEERING CONFERENCE, VOL 4, 2008, : 103 - 116