[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppAbstractBaseClass
An ABC can be recognized by a member function starting with the keyword virtual and ending with =0;.
'ABC' is a base class, so it must have a virtual destructor.
Many Design Patterns rely on an ABC, e.g. the Strategy is a simple example.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppAbstractBaseClass
(C++) Abstract Base Class
Class that can not be instanciated itself, only its derivatives can. Often abbreviated as ABC.An ABC can be recognized by a member function starting with the keyword virtual and ending with =0;.
struct ABC
{
virtual ~ABC() {} //Empty virtual destructor
virtual void whatMakesMeAbstract() = 0;
};
'ABC' is a base class, so it must have a virtual destructor.
Many Design Patterns rely on an ABC, e.g. the Strategy is a simple example.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
