Title :
Better alternative Run-Time Polymorphism in C++: A practical approach in OO design for machine intelligence
Author :
Nath, Singh Paras ; Vikram, Singh ; Anand, Kumar
Author_Institution :
Dept. of CSE, Majhigharini Inst. of Technol. & Sci., Rayagada, India
Abstract :
Main essence of polymorphism feature of Object Oriented Programming provided by the developer Bjarne Stroustrup in C++ is Run Time Polymorphism using virtual member functions in base classes. Base class pointer keeps the address of derived class object but during run-time it calls the base class function, even functions in base and derived classes have same signatures. To call the same function of derived class by base class pointer, we make the base class function as virtual to implement “Run-Time polymorphism”. Several papers by different authors including developer of C++ have come to solve the related complexities like “Object Slicing” and others. In this paper our motivation is to analyse and explore alternative adaptation by type identifier with polymorphic behaviour of type cast combining the overloading of insertion and extraction operators. Analysing the approaches we find a better alternative style of Run-Time Polymorphism that uses less memory than the existing virtual method techniques by comparable performance.
Keywords :
C++ language; artificial intelligence; object-oriented programming; C++; OO design; base class function; base class pointer; extraction operators; insertion operators; machine intelligence; object oriented programming; object slicing; run-time polymorphism; type cast polymorphic behaviour; type identifier; virtual member functions; virtual method techniques; DVD; Handheld computers; Informatics; Memory management; Object recognition; Runtime; Base class pointer keeps address of derived class object; Insertion Function; Run-Time Polymorphism; Type Identifier; dynamic_Cast Operator; vpointer; vtable;
Conference_Titel :
Computer Communication and Informatics (ICCCI), 2012 International Conference on
Conference_Location :
Coimbatore
Print_ISBN :
978-1-4577-1580-8
DOI :
10.1109/ICCCI.2012.6158776