aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/overloadsort.h
blob: 473828da9d64f90f9d03c9ff4085e62fdf0c33fb (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#ifndef OVERLOADSORT_H
#define OVERLOADSORT_H

#include "libsamplemacros.h"

#include <list>

class ImplicitTarget
{
public:
    ImplicitTarget(){}
};

class ImplicitBase
{
public:
    ImplicitBase(){}
    ImplicitBase(const ImplicitTarget &b);
};

inline ImplicitBase::ImplicitBase(const ImplicitTarget &)
{
}

class LIBSAMPLE_API SortedOverload
{
public:

    const char *overload(int x);
    const char *overload(double x);
    const char *overload(ImplicitBase x);
    const char *overload(ImplicitTarget x);
    const char *overload(const std::list<ImplicitBase> &x);

    int implicit_overload(const ImplicitBase &x);

    const char *overloadDeep(int x, ImplicitBase &y);

    inline const char* pyObjOverload(int, int) { return "int,int"; }
    inline const char* pyObjOverload(unsigned char*, int) { return "PyObject,int"; }

};

class LIBSAMPLE_API CustomOverloadSequence
{
public:
    int overload(short v) const;
    int overload(int v) const;
};

#endif // OVERLOADSORT_H