¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

OOP

Pankaj Kumar Inglés

Contenido del mapa

OOP

  1. 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
  2. initializer list

    • first base then derived
    • reference data member
    • more efficient
  3. template

    • partially specialized
    • fully specialized
    • templatized class / Func
  4. 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
  5. operator new delete

    • new operator = op new + invoke ctor
    • op delete will be invoked by system if op new Ok but ctor NG
  6. smart ptr

  7. functor

    • class which define op()
    • they can contain state
  8. 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
  9. 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
    • reinterpret
      • bit manupulation

Información

Descripción
Mapa Mental sobre OOP, creado por Pankaj Kumar el 18/01/2018.
Creado por
Pankaj Kumar
Visitas
1
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?