Debugger: Move LldbEngine::Command to debuggerprotocol

Better re-usable over there.

Change-Id: I75b70054d691771efaf5b19680d8a93d2943b5ba
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-02-02 12:47:51 +01:00
parent 7005d791c3
commit ba05edc6bb
5 changed files with 175 additions and 173 deletions

View File

@@ -36,6 +36,34 @@
namespace Debugger {
namespace Internal {
// Convenience structure to build up backend commands.
class DebuggerCommand
{
public:
DebuggerCommand() {}
DebuggerCommand(const char *f) : function(f) {}
const DebuggerCommand &arg(const char *name) const;
const DebuggerCommand &arg(const char *name, int value) const;
const DebuggerCommand &arg(const char *name, qlonglong value) const;
const DebuggerCommand &arg(const char *name, qulonglong value) const;
const DebuggerCommand &arg(const char *name, const QString &value) const;
const DebuggerCommand &arg(const char *name, const QByteArray &value) const;
const DebuggerCommand &arg(const char *name, const char *value) const;
const DebuggerCommand &beginList(const char *name = 0) const;
void endList() const;
const DebuggerCommand &beginGroup(const char *name = 0) const;
void endGroup() const;
static QByteArray toData(const QList<QByteArray> &value);
static QByteArray toData(const QHash<QByteArray, QByteArray> &value);
QByteArray function;
mutable QByteArray args;
private:
const DebuggerCommand &argHelper(const char *name, const QByteArray &value) const;
};
/*
output ==>