From f5d9fe6211bd397deb0ac19b634f551edfa0f6b8 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 30 Jan 2022 20:19:02 +0100 Subject: Initialize project --- src/ProcessLinux.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/ProcessLinux.hpp (limited to 'src/ProcessLinux.hpp') diff --git a/src/ProcessLinux.hpp b/src/ProcessLinux.hpp new file mode 100644 index 0000000..533054e --- /dev/null +++ b/src/ProcessLinux.hpp @@ -0,0 +1,26 @@ +#include "Process.hpp" +#include +#include +#include +#include + +namespace uciadapter { + +class ProcessLinux : public Process { + /// @brief Create pipe to engine stdin + int in_fd[2]; + /// @brief Create pipe to the engine stdout + int out_fd[2]; + /// @brief Writing buffer + char buffer[BUFFER_SIZE]; + /// @brief Contains engine pid + pid_t pid; + +public: + ProcessLinux(); + void Kill(); + void Start(std::string); + std::string ReadLine(); + void Write(std::string); +}; +}; // namespace uciadapter \ No newline at end of file -- cgit v1.2.3