Application and Analysis of a Kind of Generic Programming
XU Man-wu · Jisuanji yingyong yanjiu · 2005
In an OO software system implemented in (C++) language, class interfaces are usually defined by virtual base class and virtual functions. However, with the acceleration of software renewal,this technique is difficult to satisfied both efficiency and compatibility. A policies-based design is introduced, the class interface with generic components and the class interface according to need is defined and the class interface reuse becomes much easier. Analysis and experimental results show that the performance of polices-based implementation method is superior to virtual function mechanism.