blob: 4a81bd08b7c75fa5d6d53f0bc83371440ef7959c (
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
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "icecream.h"
#include <iostream>
Icecream::Icecream(const std::string &flavor) : m_flavor(flavor) {}
Icecream::~Icecream() = default;
std::string Icecream::getFlavor() const
{
return m_flavor;
}
Icecream *Icecream::clone()
{
return new Icecream(*this);
}
std::ostream &operator<<(std::ostream &str, const Icecream &i)
{
str << i.getFlavor();
return str;
}
|