forked from qt-creator/qt-creator
Clang: Inline UnregisterTranslationUnitsForEditorMessage
Change-Id: If4adf19cc4ea9325a6f94d4c2b989609e1e83239 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -29,41 +29,10 @@
|
|||||||
#include <gtest/gtest-printers.h>
|
#include <gtest/gtest-printers.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QDataStream>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
namespace ClangBackEnd {
|
namespace ClangBackEnd {
|
||||||
|
|
||||||
|
|
||||||
UnregisterTranslationUnitsForEditorMessage::UnregisterTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
|
||||||
: fileContainers_(fileContainers)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const QVector<FileContainer> &UnregisterTranslationUnitsForEditorMessage::fileContainers() const
|
|
||||||
{
|
|
||||||
return fileContainers_;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message)
|
|
||||||
{
|
|
||||||
out << message.fileContainers_;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message)
|
|
||||||
{
|
|
||||||
in >> message.fileContainers_;
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second)
|
|
||||||
{
|
|
||||||
return first.fileContainers_ == second.fileContainers_;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message)
|
QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message)
|
||||||
{
|
{
|
||||||
debug.nospace() << "UnregisterTranslationUnitsForEditorMessage(";
|
debug.nospace() << "UnregisterTranslationUnitsForEditorMessage(";
|
||||||
|
@@ -33,31 +33,47 @@
|
|||||||
|
|
||||||
namespace ClangBackEnd {
|
namespace ClangBackEnd {
|
||||||
|
|
||||||
class CMBIPC_EXPORT UnregisterTranslationUnitsForEditorMessage
|
class UnregisterTranslationUnitsForEditorMessage
|
||||||
{
|
{
|
||||||
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message);
|
|
||||||
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message);
|
|
||||||
friend CMBIPC_EXPORT bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second);
|
|
||||||
friend void PrintTo(const UnregisterTranslationUnitsForEditorMessage &message, ::std::ostream* os);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UnregisterTranslationUnitsForEditorMessage() = default;
|
UnregisterTranslationUnitsForEditorMessage() = default;
|
||||||
UnregisterTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers);
|
UnregisterTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||||
|
: fileContainers_(fileContainers)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const QVector<FileContainer> &fileContainers() const;
|
const QVector<FileContainer> &fileContainers() const
|
||||||
|
{
|
||||||
|
return fileContainers_;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message)
|
||||||
|
{
|
||||||
|
out << message.fileContainers_;
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message)
|
||||||
|
{
|
||||||
|
in >> message.fileContainers_;
|
||||||
|
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second)
|
||||||
|
{
|
||||||
|
return first.fileContainers_ == second.fileContainers_;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef UNIT_TESTS
|
||||||
|
friend void PrintTo(const UnregisterTranslationUnitsForEditorMessage &message, ::std::ostream* os);
|
||||||
|
#endif
|
||||||
private:
|
private:
|
||||||
QVector<FileContainer> fileContainers_;
|
QVector<FileContainer> fileContainers_;
|
||||||
};
|
};
|
||||||
|
|
||||||
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UnregisterTranslationUnitsForEditorMessage &message);
|
|
||||||
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UnregisterTranslationUnitsForEditorMessage &message);
|
|
||||||
CMBIPC_EXPORT bool operator==(const UnregisterTranslationUnitsForEditorMessage &first, const UnregisterTranslationUnitsForEditorMessage &second);
|
|
||||||
|
|
||||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message);
|
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message);
|
||||||
#ifdef CLANGBACKEND_TESTS
|
|
||||||
void PrintTo(const UnregisterTranslationUnitsForEditorMessage &message, ::std::ostream* os);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_MESSAGE(UnregisterTranslationUnitsForEditorMessage);
|
DECLARE_MESSAGE(UnregisterTranslationUnitsForEditorMessage);
|
||||||
} // namespace ClangBackEnd
|
} // namespace ClangBackEnd
|
||||||
|
Reference in New Issue
Block a user