aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libother/othermultiplederived.cpp
blob: cfbbfb2c2cfddb51fd42902d23d81ff10d237000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "othermultiplederived.h"

VirtualMethods OtherMultipleDerived::returnUselessClass()
{
    return VirtualMethods();
}

Base1 *OtherMultipleDerived::createObject(const std::string &objName)
{
    if (objName == "Base1")
        return new Base1;
    if (objName == "MDerived1")
        return new MDerived1;
    if (objName == "SonOfMDerived1")
        return new SonOfMDerived1;
    if (objName == "MDerived3")
        return new MDerived3;
    if (objName == "OtherMultipleDerived")
        return new OtherMultipleDerived;
    return nullptr;
}