//-----------------------------------------------------------------------------
QoreClass* initBuiltinInheritanceTestBaseClass()
{
  QoreClass* tst = new QoreClass("BuiltinInheritanceTestBase", QDOM_PROCESS);
  CID_BUILTININHERITANCETESTBASE = tst->getID();

  tst->setConstructor((q_constructor_t)BUILTININHERITANCETESTBASE_constructor);
  tst->setDestructor((q_destructor_t)BUILTININHERITANCETESTBASE_destructor);
  tst->addMethod("getnum", (q_method_t)BUILTININHERITANCETESTBASE_getnum);
  return tst;
}
//-----------------------------------------------------------------------------
// override getnum()
QoreClass* initBuiltinInheritanceTestDescendant4(QoreClass* base)
{
  QoreClass* tst = new QoreClass("BuiltinInheritanceTestDescendant4", QDOM_PROCESS);
  CID_BUILTININHERITANCETESTDESCENDANT4 = tst->getID();
  tst->addDefaultBuiltinBaseClass(base);

  tst->addMethod("getnum", (q_method_t)BUILTININHERITANCETESTDESCENDANT4_getnum);

  return tst;
}
//-----------------------------------------------------------------------------
// override constructor, destructor, getnum()
QoreClass* initBuiltinInheritanceTestDescendant2(QoreClass* base)
{
  QoreClass* tst = new QoreClass("BuiltinInheritanceTestDescendant2", QDOM_PROCESS);
  CID_BUILTININHERITANCETESTDESCENDANT2 = tst->getID();
  tst->addDefaultBuiltinBaseClass(base);

  tst->setConstructor((q_constructor_t)BUILTININHERITANCETESTDESCENDANT2_constructor);
  tst->setDestructor((q_destructor_t)BUILTININHERITANCETESTDESCENDANT2_destructor);
  tst->addMethod("getnum", (q_method_t)BUILTININHERITANCETESTDESCENDANT2_getnum);

  return tst;
}
//-----------------------------------------------------------------------------
QoreClass* initBuiltinInheritanceTestDescendantMulti(QoreClass* base, QoreClass* base2)
{
  QoreClass* tst = new QoreClass("BuiltinInheritanceTestDescendantMulti", QDOM_PROCESS);
  CID_BUILTININHERITANCETESTDESCENDANT_MULTI = tst->getID();

  // we have a method (getnum) below, but no constructor to set our own private data,
  // therefore we have to call addDefaultBuiltinBaseClass() on one of the base classes
  // to have some private data...
  //tst->addBuiltinBaseClass(base);
  tst->addBuiltinBaseClass(base2);

  // OTOH simple inheritance works
  tst->addDefaultBuiltinBaseClass(base);

  tst->addMethod("getnum", (q_method_t)BUILTININHERITANCETESTDESCENDANT_MULTI_getnum);
  return tst;
}