mirror of https://github.com/laurent22/joplin.git
36 lines
454 B
C++
36 lines
454 B
C++
#ifndef CLIAPPLICATION_H
|
|
#define CLIAPPLICATION_H
|
|
|
|
#include <stable.h>
|
|
|
|
#include "command.h"
|
|
|
|
namespace jop {
|
|
|
|
class StdoutHandler : public QTextStream {
|
|
|
|
public:
|
|
|
|
StdoutHandler();
|
|
|
|
};
|
|
|
|
inline StdoutHandler& qStdout() {
|
|
static StdoutHandler r;
|
|
return r;
|
|
}
|
|
|
|
class CliApplication : public QCoreApplication {
|
|
|
|
public:
|
|
|
|
CliApplication(int &argc, char **argv);
|
|
void processCommand(const Command &command);
|
|
int exec();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // CLIAPPLICATION_H
|