ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
Loading...
Searching...
No Matches
ProcessOutputUtils.h File Reference

Helpers for draining process output into log entries. More...

#include "core/LogEntry.h"
#include "core/ProcessLogParser.h"
#include <QDateTime>
#include <QHash>
#include <QProcess>
#include <functional>
Include dependency graph for ProcessOutputUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using acav::LogEmitter = std::function<void(const LogEntry &)>

Functions

void acav::emitParsedOutput (QString &buffer, const QString &chunk, const QString &source, bool isStdErr, const LogEmitter &emitLog)
void acav::emitParsedOutput (QHash< QProcess *, QString > &buffers, QProcess *process, const QString &chunk, const QString &source, bool isStdErr, const LogEmitter &emitLog)
void acav::drainProcessOutput (QProcess *process, QString &stdoutBuffer, QString &stderrBuffer, const QString &source, const LogEmitter &emitLog)
void acav::drainProcessOutput (QProcess *process, QString &stdoutBuffer, QString &stderrBuffer, const QString &source, const LogEmitter &emitLog, QString *stdoutCapture, QString *stderrCapture)
void acav::drainProcessOutput (QProcess *process, QHash< QProcess *, QString > &stdoutBuffers, QHash< QProcess *, QString > &stderrBuffers, const QString &source, const LogEmitter &emitLog)
void acav::drainProcessOutput (QProcess *process, QHash< QProcess *, QString > &stdoutBuffers, QHash< QProcess *, QString > &stderrBuffers, const QString &source, const LogEmitter &emitLog, QString *stdoutCapture, QString *stderrCapture)
void acav::emitErrorLog (const QString &source, const QString &message, const LogEmitter &emitLog)

Detailed Description

Helpers for draining process output into log entries.

Definition in file ProcessOutputUtils.h.

Typedef Documentation

◆ LogEmitter

using acav::LogEmitter = std::function<void(const LogEntry &)>

Definition at line 36 of file ProcessOutputUtils.h.

Function Documentation

◆ drainProcessOutput() [1/4]

void acav::drainProcessOutput ( QProcess * process,
QHash< QProcess *, QString > & stdoutBuffers,
QHash< QProcess *, QString > & stderrBuffers,
const QString & source,
const LogEmitter & emitLog )
inline

Definition at line 111 of file ProcessOutputUtils.h.

◆ drainProcessOutput() [2/4]

void acav::drainProcessOutput ( QProcess * process,
QHash< QProcess *, QString > & stdoutBuffers,
QHash< QProcess *, QString > & stderrBuffers,
const QString & source,
const LogEmitter & emitLog,
QString * stdoutCapture,
QString * stderrCapture )
inline

Definition at line 124 of file ProcessOutputUtils.h.

◆ drainProcessOutput() [3/4]

void acav::drainProcessOutput ( QProcess * process,
QString & stdoutBuffer,
QString & stderrBuffer,
const QString & source,
const LogEmitter & emitLog )
inline

Definition at line 59 of file ProcessOutputUtils.h.

◆ drainProcessOutput() [4/4]

void acav::drainProcessOutput ( QProcess * process,
QString & stdoutBuffer,
QString & stderrBuffer,
const QString & source,
const LogEmitter & emitLog,
QString * stdoutCapture,
QString * stderrCapture )
inline

Definition at line 81 of file ProcessOutputUtils.h.

◆ emitErrorLog()

void acav::emitErrorLog ( const QString & source,
const QString & message,
const LogEmitter & emitLog )
inline

Definition at line 140 of file ProcessOutputUtils.h.

◆ emitParsedOutput() [1/2]

void acav::emitParsedOutput ( QHash< QProcess *, QString > & buffers,
QProcess * process,
const QString & chunk,
const QString & source,
bool isStdErr,
const LogEmitter & emitLog )
inline

Definition at line 48 of file ProcessOutputUtils.h.

◆ emitParsedOutput() [2/2]

void acav::emitParsedOutput ( QString & buffer,
const QString & chunk,
const QString & source,
bool isStdErr,
const LogEmitter & emitLog )
inline

Definition at line 38 of file ProcessOutputUtils.h.