// Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #ifndef STDSHAREDPTRTESTBENCH_H #define STDSHAREDPTRTESTBENCH_H #include "libsmartmacros.h" #include class Integer; class LIB_SMART_API StdSharedPtrTestBench { public: StdSharedPtrTestBench(); ~StdSharedPtrTestBench(); static std::shared_ptr createInteger(int v = 42); static std::shared_ptr createNullInteger(); static void printInteger(const std::shared_ptr &); static std::shared_ptr createInt(int v = 42); static std::shared_ptr createNullInt(); static void printInt(const std::shared_ptr &); }; class LIB_SMART_API StdSharedPtrVirtualMethodTester { public: StdSharedPtrVirtualMethodTester(); virtual ~StdSharedPtrVirtualMethodTester(); std::shared_ptr callModifyInteger(const std::shared_ptr &p); protected: virtual std::shared_ptr doModifyInteger(std::shared_ptr p); }; #endif // STDSHAREDPTRTESTBENCH_H