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 "translationunitdoesnotexistmessage.h"
|
||||||
|
|
||||||
#include <QDataStream>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
namespace ClangBackEnd {
|
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)
|
QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message)
|
||||||
{
|
{
|
||||||
debug.nospace() << "TranslationUnitDoesNotExistMessage(";
|
debug.nospace() << "TranslationUnitDoesNotExistMessage(";
|
||||||
|
|
||||||
debug.nospace() << message.fileContainer_;
|
debug.nospace() << message.fileContainer();
|
||||||
|
|
||||||
debug.nospace() << ")";
|
debug.nospace() << ")";
|
||||||
|
|
||||||
|
@@ -29,30 +29,58 @@
|
|||||||
|
|
||||||
namespace ClangBackEnd {
|
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:
|
public:
|
||||||
TranslationUnitDoesNotExistMessage() = default;
|
TranslationUnitDoesNotExistMessage() = default;
|
||||||
TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer);
|
TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer)
|
||||||
TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId);
|
: fileContainer_(fileContainer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const FileContainer &fileContainer() const;
|
TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||||
const Utf8String &filePath() const;
|
: fileContainer_(filePath, projectPartId)
|
||||||
const Utf8String &projectPartId() const;
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
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:
|
private:
|
||||||
FileContainer fileContainer_;
|
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);
|
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message);
|
||||||
void PrintTo(const TranslationUnitDoesNotExistMessage &message, ::std::ostream* os);
|
void PrintTo(const TranslationUnitDoesNotExistMessage &message, ::std::ostream* os);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user