#include <iostream>

// The target interface
// baby boss mandated
class BabyBossTargetInterface
{
public:
  virtual void babyCommand() = 0;
};

// Main software
class Original
{
public:
  Original(){}
  void command()
  {
    std::cout << "Calling the original command" << std::endl;
  }

};

// the adapter publically inherits from baby boss's target BabyBossTargetInterface
// and privately from the original class
// making baby boss's interface visible to the client
// but not the original class (the original class is only used inside the adapter)
class BabyBossToOriginalAdapter : public BabyBossTargetInterface,  private Original
{
public:
  BabyBossToOriginalAdapter(){}
  virtual void babyCommand()
  {
    std::cout << "From babyCommand()" << std::endl;
    command();
  }
};

// client
int main()
{
  BabyBossTargetInterface * babyBoss = new BabyBossToOriginalAdapter();
  babyBoss->babyCommand();
  // the client knows nothing about the original class
  // yet is using it via the interface baby boss mandated
}