forked from qt-creator/qt-creator
Clang: Inline TranslationUnitDoesNotExistMessage
Change-Id: Ib1f23410163036eb8de603eb3eef82c14428a8a5 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -25,62 +25,17 @@
|
||||
|
||||
#include "translationunitdoesnotexistmessage.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
TranslationUnitDoesNotExistMessage::TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer)
|
||||
: fileContainer_(fileContainer)
|
||||
{
|
||||
}
|
||||
|
||||
TranslationUnitDoesNotExistMessage::TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||
: fileContainer_(filePath, projectPartId)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &TranslationUnitDoesNotExistMessage::fileContainer() const
|
||||
{
|
||||
return fileContainer_;
|
||||
}
|
||||
|
||||
const Utf8String &TranslationUnitDoesNotExistMessage::filePath() const
|
||||
{
|
||||
return fileContainer_.filePath();
|
||||
}
|
||||
|
||||
const Utf8String &TranslationUnitDoesNotExistMessage::projectPartId() const
|
||||
{
|
||||
return fileContainer_.projectPartId();
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
out << message.fileContainer_;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
in >> message.fileContainer_;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
bool operator==(const TranslationUnitDoesNotExistMessage &first, const TranslationUnitDoesNotExistMessage &second)
|
||||
{
|
||||
return first.fileContainer_ == second.fileContainer_;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
debug.nospace() << "TranslationUnitDoesNotExistMessage(";
|
||||
|
||||
debug.nospace() << message.fileContainer_;
|
||||
debug.nospace() << message.fileContainer();
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
|
@@ -29,30 +29,58 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class CMBIPC_EXPORT TranslationUnitDoesNotExistMessage
|
||||
class TranslationUnitDoesNotExistMessage
|
||||
{
|
||||
friend CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const TranslationUnitDoesNotExistMessage &message);
|
||||
friend CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, TranslationUnitDoesNotExistMessage &message);
|
||||
friend CMBIPC_EXPORT bool operator==(const TranslationUnitDoesNotExistMessage &first, const TranslationUnitDoesNotExistMessage &second);
|
||||
friend CMBIPC_EXPORT QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message);
|
||||
friend void PrintTo(const TranslationUnitDoesNotExistMessage &message, ::std::ostream* os);
|
||||
public:
|
||||
TranslationUnitDoesNotExistMessage() = default;
|
||||
TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer);
|
||||
TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId);
|
||||
TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer)
|
||||
: fileContainer_(fileContainer)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const;
|
||||
const Utf8String &filePath() const;
|
||||
const Utf8String &projectPartId() const;
|
||||
TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||
: fileContainer_(filePath, projectPartId)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return fileContainer_;
|
||||
}
|
||||
|
||||
const Utf8String &filePath() const
|
||||
{
|
||||
return fileContainer_.filePath();
|
||||
}
|
||||
|
||||
const Utf8String &projectPartId() const
|
||||
{
|
||||
return fileContainer_.projectPartId();
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
out << message.fileContainer_;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
in >> message.fileContainer_;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const TranslationUnitDoesNotExistMessage &first, const TranslationUnitDoesNotExistMessage &second)
|
||||
{
|
||||
return first.fileContainer_ == second.fileContainer_;
|
||||
}
|
||||
|
||||
private:
|
||||
FileContainer fileContainer_;
|
||||
};
|
||||
|
||||
CMBIPC_EXPORT QDataStream &operator<<(QDataStream &out, const TranslationUnitDoesNotExistMessage &message);
|
||||
CMBIPC_EXPORT QDataStream &operator>>(QDataStream &in, TranslationUnitDoesNotExistMessage &message);
|
||||
CMBIPC_EXPORT bool operator==(const TranslationUnitDoesNotExistMessage &first, const TranslationUnitDoesNotExistMessage &second);
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message);
|
||||
void PrintTo(const TranslationUnitDoesNotExistMessage &message, ::std::ostream* os);
|
||||
|
||||
|
Reference in New Issue
Block a user