forked from qt-creator/qt-creator
Clang: Inline UpdateTranslationUnitsForEditorMessage
Change-Id: I0e68c138d5eed394f9fece1bd3ca6fbd39575348 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -25,42 +25,12 @@
|
||||
|
||||
#include "updatetranslationunitsforeditormessage.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
UpdateTranslationUnitsForEditorMessage::UpdateTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: fileContainers_(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &UpdateTranslationUnitsForEditorMessage::fileContainers() const
|
||||
{
|
||||
return fileContainers_;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
out << message.fileContainers_;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
in >> message.fileContainers_;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
bool operator==(const UpdateTranslationUnitsForEditorMessage &first, const UpdateTranslationUnitsForEditorMessage &second)
|
||||
{
|
||||
return first.fileContainers_ == second.fileContainers_;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
debug.nospace() << "UpdateTranslationUnitsForEditorMessage(";
|
||||
|
@@ -31,26 +31,43 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT UpdateTranslationUnitsForEditorMessage
|
||||
class UpdateTranslationUnitsForEditorMessage
|
||||
{
|
||||
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UpdateTranslationUnitsForEditorMessage &message);
|
||||
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UpdateTranslationUnitsForEditorMessage &message);
|
||||
friend CMBIPC_EXPORT bool operator==(const UpdateTranslationUnitsForEditorMessage &first, const UpdateTranslationUnitsForEditorMessage &second);
|
||||
friend void PrintTo(const UpdateTranslationUnitsForEditorMessage &message, ::std::ostream* os);
|
||||
public:
|
||||
UpdateTranslationUnitsForEditorMessage() = default;
|
||||
UpdateTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers);
|
||||
UpdateTranslationUnitsForEditorMessage(const QVector<FileContainer> &fileContainers)
|
||||
: fileContainers_(fileContainers)
|
||||
{
|
||||
}
|
||||
|
||||
const QVector<FileContainer> &fileContainers() const;
|
||||
const QVector<FileContainer> &fileContainers() const
|
||||
{
|
||||
return fileContainers_;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
out << message.fileContainers_;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, UpdateTranslationUnitsForEditorMessage &message)
|
||||
{
|
||||
in >> message.fileContainers_;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const UpdateTranslationUnitsForEditorMessage &first, const UpdateTranslationUnitsForEditorMessage &second)
|
||||
{
|
||||
return first.fileContainers_ == second.fileContainers_;
|
||||
}
|
||||
|
||||
private:
|
||||
QVector<FileContainer> fileContainers_;
|
||||
};
|
||||
|
||||
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const UpdateTranslationUnitsForEditorMessage &message);
|
||||
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, UpdateTranslationUnitsForEditorMessage &message);
|
||||
CMBIPC_EXPORT bool operator==(const UpdateTranslationUnitsForEditorMessage &first, const UpdateTranslationUnitsForEditorMessage &second);
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &message);
|
||||
void PrintTo(const UpdateTranslationUnitsForEditorMessage &message, ::std::ostream* os);
|
||||
|
||||
|
Reference in New Issue
Block a user