Mindmap
OOP
Inhalt der Mindmap
OOP
virtual
- destructor
- if not there derived class dtor won't be called memory leak
- constructor
- theoretically not possible feasible thru Factory model
- table
- vptr added to base class
- setup at compile time
- supported even for classes with virtual base class
- destructor
initializer list
- first base then derived
- reference data member
- more efficient
template
- partially specialized
- fully specialized
- templatized class / Func
ctor dtor
- 1. ctor of most derived class to call ctor of virtual base class
- 2. ctor in same order as defined
- 3. non-static member of most derived classes in same order
- 4. body of ctor executed
- if ctor overloaded in derived then rest ctor hidden
operator new delete
- new operator = op new + invoke ctor
- op delete will be invoked by system if op new Ok but ctor NG
smart ptr
functor
- class which define op()
- they can contain state
object slicing
- obj derived class = obj base class
- data added by subclass discarded
- obj of subclass is passed or returned by value from a function expecting base class obj
type casting
- static
- implicit
- explicit
- cast through inheritance hierarchy
- dynamic
- polymorphism
- can cast sideways & up another chain
- limitation
- fail to travel thru protected/private inheritance
- polymorphism
- reinterpret
- bit manupulation
- static
Informationen
- Beschreibung
- Mindmap am OOP, erstellt von Pankaj Kumar am 18/01/2018.
- Erstellt von
- Pankaj Kumar
- Aufrufe
- 1
- Bewertung