I would like to extend the MinimumDiameter class in order to add some more methods. I've tried with the classical C++ syntax:
class ExtendedMinimumDiameter : public MinimumDiameter{};
ExtendedMinimumDiameter *minimumDiameter = new ExtendedMinimumDiameter(inputGeometry);
The problem is that when I try to instantiate an object of my new class, gcc-4.8.2 complains as follows:
operators.cpp:194:92: error: no matching function for call to 'ExtendedMinimumDiameter::ExtendedMinimumDiameter(const geos::geom::Geometry*&)'
ExtendedMinimumDiameter minimumDiameter = ExtendedMinimumDiameter(inputGeometry);
^
operators.cpp:194:92: note: candidates are:
operators.cpp:116:7: note: ExtendedMinimumDiameter::ExtendedMinimumDiameter()
class ExtendedMinimumDiameter : public MinimumDiameter{
^
operators.cpp:116:7: note: candidate expects 0 arguments, 1 provided
operators.cpp:116:7: note: ExtendedMinimumDiameter::ExtendedMinimumDiameter(const ExtendedMinimumDiameter&)
operators.cpp:116:7: note: no known conversion for argument 1 from 'const geos::geom::Geometry*' to 'const ExtendedMinimumDiameter&'
Why it does not use the parent constructor, and suggests instead to use the default one without parameters? What is missing to my code?