blob: 54db3e9bdd789a6bd772270465b5fa05a5148f44 (
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
56
57
58
|
// 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 ECHO_H
#define ECHO_H
#include "libsamplemacros.h"
#include "str.h"
class ObjectType;
class Echo
{
public:
Echo(){}
~Echo(){}
void doNothingWithConstBool(const bool hi);
void methodWithNamedArg(const Str& string = Str(""));
Str operator()(const Str& s, const int i) { return s + i; }
// These method are here just for compilation test purposes
Echo& operator<<(unsigned int item);
Echo& operator<<(signed int item);
Echo& operator<<(const ObjectType *item);
Echo& operator<<(Str str);
};
inline void Echo::doNothingWithConstBool(const bool)
{
}
inline void Echo::methodWithNamedArg(const Str &)
{
}
inline Echo &Echo::operator<<(unsigned int)
{
return *this;
}
inline Echo &Echo::operator<<(signed int)
{
return *this;
}
inline Echo &Echo::operator<<(const ObjectType *)
{
return *this;
}
inline Echo &Echo::operator<<(Str)
{
return *this;
}
#endif // ECHO_H
|