#include <iostream>

class Geometry {
private:
  float fRadius;
  int iSegments;
  float fWidth;
  float fLenght;
  std::string stdstrType;
  bool bValid;

public:
  Geometry() {
    // Set data Elements
    std::cout << "Constructor 1 is called\n";
  }

  Geometry(float Radius, int Segments, float Width, float Length,
    std::string strType, bool bValue) {
    // Set data Elements
    std::cout << "Constructor 2 is called\n";
  }

  Geometry(const Geometry & g) {
    // Set data Elements
    std::cout << "Constructor 3 is called\n";
  }
};

class Container {
private:
  std::string stdstrContainerName;
  std::string stdstrPluginType;
  Geometry Geom;

public:
  Container(std::string, std::string, Geometry geometry);
};

Container::Container(std::string strName, std::string strType,
  Geometry geometry) {
  stdstrContainerName = stdstrContainerName;
  stdstrPluginType = stdstrPluginType;
  Geom = geometry;
}

class ContainerWithMemberInit {
private:
  std::string stdstrContainerName;
  std::string stdstrPluginType;
  Geometry Geom;

public:
  ContainerWithMemberInit(std::string, std::string, Geometry geometry);
};

ContainerWithMemberInit::ContainerWithMemberInit(std::string strName, std::string strType, Geometry geometry)
  : stdstrContainerName(strName)
  , stdstrPluginType(strType)
  , Geom(geometry)            // copy-constructor, i.e. Geometry(Geometry const&)    
{
}

int main() {
	{
		Geometry geometry(0.3, 32, 0.0, 0.0, "SPHERE", true);
		// Constructor 2 is called
		Container cont("Sphere", "SPHERE", geometry);
		// Constructor 3 is called
		// Constructor 1 is called
	}
	std::cout << "break\n";
	{
		Geometry geometry(0.3, 32, 0.0, 0.0, "SPHERE", true);
		// Constructor 2 is called
		ContainerWithMemberInit cont("Sphere", "SPHERE", geometry);
		// Constructor 3 is called
		// Constructor 3 is called
	}
}

