37 lines
645 B
C++
37 lines
645 B
C++
#ifndef CCPROCESS_H
|
|
#define CCPROCESS_H
|
|
|
|
#include "CC.h"
|
|
|
|
#define CC_PROCESS_MAX_BUFFER_SIZE 1024
|
|
#define Process_Read_Error "-1_-1_-"
|
|
|
|
namespace CTL{
|
|
class Process
|
|
{
|
|
private:
|
|
FILE* pipe = nullptr;
|
|
std::queue<String> CommandQueues;
|
|
std::queue<String> ReadBuffer;
|
|
bool Flag = false;
|
|
public:
|
|
Process() = default;
|
|
Process(Process& p);
|
|
void AddCommand(const String& Command);
|
|
void Start();
|
|
void Stop();
|
|
String ReadLineBuffer();
|
|
bool IsRunning();
|
|
static void Execute(const String& Command);
|
|
private:
|
|
|
|
public:
|
|
|
|
};
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|