title: C++ Singleton class - inheritance good practice
body: <p>In an existing project, I am to inherit a Controller class (MVC) declared as Singleton so as to define my own treatment. How to appropriately derive this Singleton class? </p>
  
  <p>First, I expand on context and need for this inheritance. </p>
  
  <p>The application that I am added to the existing software wants to use a MVC module that performs almost same task as the one I am willing to perform. It is using the same methods up to signature and slight modifications. Rewriting my own MVC module would definitively be duplication of code. The existing module is intrinsically oriented towards its application to another part of the software, and I cannot simply use the same module. But is written as a Model-View-Controller pattern where Controller is Singleton. I derived View already.</p>
  
  <p>Second, I have doubt that I can classicaly derive Singleton class.</p>
  
  <p>Calling constructor from inherited class would simply call getinstance() for parent class and fail to return an object from derived class (?).</p>
  
  <p>Third, it's how I see some way to deal with. Please comment/help me improve!</p>
  
  <p>I copy the whole Singleton class in a class I could call AbstractController. I derive this class twice. The first child is singleton and adopts the whole treatment of parent class. The second child is the Controller for my part of the application, with own redefined treatment.</p>
  
  <p>Thanks!</p>