Subtle Methods in C++

Zalán Szűgyi, Norbert Pataki, József Mihalicza · Acta Electrotechnica et Informatica · 2011

Nowadays complex software systems are designed and implemented with the help of the object-oriented paradigm principally.However, object-oriented languages support the object-oriented paradigm in different ways with different constructs.C++ has a sophisticated inheritence notation based on access modifiers.C++ distinguishes virtual, pure virtual and non-virtual methods.Java uses final classes and methods to disable inheritance.However, Java does not support multiple inheritance.Eiffel allows renaming inherited methods.In this paper we present some method utilites for C++ to create safer and more flexible object-oriented systems.We present how the method renaming can be implemented.We developed constructs to create final and unhidable methods.These constructs are implemented with the help of C++ template facilities.We present scenarios where one can write safer code with our constructs.

Read the paper · More papers on PaperTik