2016-11-23 13:31:47 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
**
|
|
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-12-17 12:06:57 +01:00
|
|
|
#include <utils/cpplanguage_details.h>
|
2018-02-06 11:16:29 +01:00
|
|
|
#include <utils/optional.h>
|
2021-06-07 16:16:24 +02:00
|
|
|
#include <utils/smallstringio.h>
|
|
|
|
|
#include <utils/variant.h>
|
2017-08-17 12:44:52 +02:00
|
|
|
|
2016-11-23 13:31:47 +01:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
|
|
#include <iosfwd>
|
|
|
|
|
|
2017-12-28 22:07:28 +01:00
|
|
|
#include <gtest/gtest-printers.h>
|
|
|
|
|
|
2020-04-27 20:01:38 +02:00
|
|
|
namespace Sqlite {
|
|
|
|
|
class Value;
|
2020-10-27 15:09:25 +01:00
|
|
|
class ValueView;
|
2020-05-27 23:48:03 +02:00
|
|
|
class SessionChangeSet;
|
2020-11-05 18:12:26 +01:00
|
|
|
enum class Operation : char;
|
2021-05-12 12:21:58 +02:00
|
|
|
enum class LockingMode : char;
|
2021-12-28 11:32:47 +01:00
|
|
|
class TimeStamp;
|
2020-04-27 20:01:38 +02:00
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Value &value);
|
2020-10-27 15:09:25 +01:00
|
|
|
std::ostream &operator<<(std::ostream &out, const ValueView &value);
|
2020-11-05 18:12:26 +01:00
|
|
|
std::ostream &operator<<(std::ostream &out, Operation operation);
|
2020-05-27 23:48:03 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const SessionChangeSet &changeset);
|
2021-05-12 12:21:58 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, LockingMode lockingMode);
|
2021-12-28 11:32:47 +01:00
|
|
|
std::ostream &operator<<(std::ostream &out, TimeStamp timeStamp);
|
2020-11-05 18:12:26 +01:00
|
|
|
|
2020-10-27 15:09:25 +01:00
|
|
|
namespace SessionChangeSetInternal {
|
|
|
|
|
class ConstIterator;
|
|
|
|
|
class ConstTupleIterator;
|
|
|
|
|
class SentinelIterator;
|
|
|
|
|
class Tuple;
|
|
|
|
|
class ValueViews;
|
|
|
|
|
enum class State : char;
|
|
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, SentinelIterator iterator);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ConstIterator &iterator);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ConstTupleIterator &iterator);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Tuple &tuple);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, State operation);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ValueViews &valueViews);
|
|
|
|
|
|
|
|
|
|
} // namespace SessionChangeSetInternal
|
2020-04-27 20:01:38 +02:00
|
|
|
} // namespace Sqlite
|
|
|
|
|
|
2017-09-21 11:43:59 +02:00
|
|
|
namespace Utils {
|
2018-01-22 14:21:01 +01:00
|
|
|
class LineColumn;
|
2018-08-07 19:01:01 +02:00
|
|
|
class SmallStringView;
|
2021-06-09 11:34:58 +02:00
|
|
|
class FilePath;
|
2018-01-22 14:21:01 +01:00
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const LineColumn &lineColumn);
|
2018-12-17 12:06:57 +01:00
|
|
|
std::ostream &operator<<(std::ostream &out, const Utils::Language &language);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Utils::LanguageVersion &languageVersion);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Utils::LanguageExtension &languageExtension);
|
2021-06-09 11:34:58 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const FilePath &filePath);
|
2018-01-22 14:21:01 +01:00
|
|
|
|
2021-06-07 16:16:24 +02:00
|
|
|
template<typename Type>
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const optional<Type> &optional)
|
2018-02-06 11:16:29 +01:00
|
|
|
{
|
|
|
|
|
if (optional)
|
2019-03-13 15:09:30 +01:00
|
|
|
return out << "optional " << optional.value();
|
2018-02-06 11:16:29 +01:00
|
|
|
else
|
|
|
|
|
return out << "empty optional()";
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 16:16:24 +02:00
|
|
|
template<typename Type>
|
|
|
|
|
void PrintTo(const optional<Type> &optional, ::std::ostream *os)
|
2018-02-06 11:16:29 +01:00
|
|
|
{
|
|
|
|
|
*os << optional;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-07 16:16:24 +02:00
|
|
|
template<typename... Type>
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const variant<Type...> &variant)
|
|
|
|
|
{
|
|
|
|
|
return Utils::visit([&](auto &&value) -> std::ostream & { return out << value; }, variant);
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 19:01:01 +02:00
|
|
|
void PrintTo(Utils::SmallStringView text, ::std::ostream *os);
|
2017-09-21 11:43:59 +02:00
|
|
|
void PrintTo(const Utils::SmallString &text, ::std::ostream *os);
|
2017-12-28 22:07:28 +01:00
|
|
|
void PrintTo(const Utils::PathString &text, ::std::ostream *os);
|
2018-02-06 11:16:29 +01:00
|
|
|
|
2019-08-20 14:45:01 +02:00
|
|
|
} // namespace Utils
|
2017-09-21 11:43:59 +02:00
|
|
|
|
2019-07-23 08:28:13 +02:00
|
|
|
namespace Debugger {
|
|
|
|
|
class DiagnosticLocation;
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const DiagnosticLocation &loc);
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|
|
|
|
|
namespace ClangTools {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
class ExplainingStep;
|
|
|
|
|
class Diagnostic;
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ExplainingStep &step);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Diagnostic &diag);
|
|
|
|
|
} // namespace Internal
|
2021-08-30 10:58:08 +02:00
|
|
|
} // namespace ClangTools
|
2019-07-23 08:28:13 +02:00
|
|
|
|
2020-06-18 19:46:01 +02:00
|
|
|
namespace QmlDesigner {
|
|
|
|
|
class ModelNode;
|
|
|
|
|
class VariantProperty;
|
2021-04-28 16:18:59 +02:00
|
|
|
template<auto Type, typename InternalIntergerType>
|
|
|
|
|
class BasicId;
|
2021-07-29 11:19:02 +02:00
|
|
|
class WatcherEntry;
|
|
|
|
|
class IdPaths;
|
|
|
|
|
class ProjectChunkId;
|
|
|
|
|
enum class SourceType : int;
|
2021-08-03 15:03:36 +02:00
|
|
|
class FileStatus;
|
2020-06-18 19:46:01 +02:00
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ModelNode &node);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const VariantProperty &property);
|
2020-09-16 13:44:43 +02:00
|
|
|
|
2021-04-28 16:18:59 +02:00
|
|
|
template<auto Type, typename InternalIntergerType>
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const BasicId<Type, InternalIntergerType> &id)
|
|
|
|
|
{
|
2021-06-03 13:06:23 +02:00
|
|
|
return out << "id=" << &id;
|
2021-04-28 16:18:59 +02:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 11:19:02 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const WatcherEntry &entry);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const IdPaths &idPaths);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ProjectChunkId &id);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, SourceType sourceType);
|
2021-08-03 15:03:36 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const FileStatus &fileStatus);
|
2021-07-29 11:19:02 +02:00
|
|
|
|
2021-05-06 12:26:39 +02:00
|
|
|
namespace Cache {
|
2021-04-28 16:18:59 +02:00
|
|
|
class SourceContext;
|
|
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const SourceContext &sourceContext);
|
2021-05-06 12:26:39 +02:00
|
|
|
} // namespace Cache
|
2021-04-28 16:18:59 +02:00
|
|
|
|
2021-05-06 15:52:20 +02:00
|
|
|
namespace Storage {
|
|
|
|
|
class Type;
|
|
|
|
|
class ExportedType;
|
2021-06-07 16:16:24 +02:00
|
|
|
class NativeType;
|
2021-08-24 16:49:42 +02:00
|
|
|
class ImportedType;
|
|
|
|
|
class QualifiedImportedType;
|
|
|
|
|
using TypeName = Utils::variant<NativeType, ExportedType>;
|
2021-05-06 15:52:20 +02:00
|
|
|
class Version;
|
|
|
|
|
class VersionNumber;
|
|
|
|
|
enum class TypeAccessSemantics : int;
|
2021-06-09 17:56:34 +02:00
|
|
|
enum class PropertyDeclarationTraits : unsigned int;
|
2021-05-06 15:52:20 +02:00
|
|
|
class PropertyDeclaration;
|
|
|
|
|
class FunctionDeclaration;
|
|
|
|
|
class ParameterDeclaration;
|
|
|
|
|
class SignalDeclaration;
|
|
|
|
|
class EnumerationDeclaration;
|
|
|
|
|
class EnumeratorDeclaration;
|
2021-09-28 17:05:23 +02:00
|
|
|
enum class ImportKind : char;
|
2021-08-24 16:49:42 +02:00
|
|
|
class Import;
|
|
|
|
|
enum class IsQualified : int;
|
2021-10-21 17:23:18 +02:00
|
|
|
class ProjectData;
|
|
|
|
|
class SynchronizationPackage;
|
|
|
|
|
enum class FileType : char;
|
|
|
|
|
enum class ChangeLevel : char;
|
2021-05-06 15:52:20 +02:00
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, TypeAccessSemantics accessSemantics);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, VersionNumber versionNumber);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, Version version);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const Type &type);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ExportedType &exportedType);
|
2021-06-07 16:16:24 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const NativeType &nativeType);
|
2021-08-24 16:49:42 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const ImportedType &importedType);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const QualifiedImportedType &importedType);
|
2021-05-06 15:52:20 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const PropertyDeclaration &propertyDeclaration);
|
2021-06-09 17:56:34 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, PropertyDeclarationTraits traits);
|
2021-05-06 15:52:20 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const FunctionDeclaration &functionDeclaration);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const ParameterDeclaration ¶meter);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const SignalDeclaration &signalDeclaration);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const EnumerationDeclaration &enumerationDeclaration);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const EnumeratorDeclaration &enumeratorDeclaration);
|
2021-09-28 17:05:23 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const ImportKind &importKind);
|
2021-08-24 16:49:42 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const Import &import);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, IsQualified isQualified);
|
2021-10-21 17:23:18 +02:00
|
|
|
std::ostream &operator<<(std::ostream &out, const ProjectData &data);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, const SynchronizationPackage &package);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, FileType fileType);
|
|
|
|
|
std::ostream &operator<<(std::ostream &out, ChangeLevel changeLevel);
|
2021-05-06 15:52:20 +02:00
|
|
|
|
|
|
|
|
} // namespace Storage
|
|
|
|
|
|
2020-06-18 19:46:01 +02:00
|
|
|
} // namespace QmlDesigner
|