1
// =======================================================================
3
// Filename: process.hpp
8
// Created: 03.05.2010 17:59:52
12
// Author: Dominik 'domachine' Burgdörfer (-), dominik.burgdoerfer@googlemail.com
15
// =======================================================================
26
* @brief Interface to spawn a system process
27
* and communicate with it.
32
* @brief Constructs a Process object.
33
* @param command The system command
35
Process(const std::string& command);
38
* @brief Spawns the process and opens read
44
* @brief Reads one character from the process
45
* output and stores it in <i>ch</i>.
46
* @param[out] ch The read character will be stored in it
48
bool operator>>(char& ch);
51
* @brief Writes <i>ch</ch> to the process input device.
52
* @param[in] ch The character to write
54
Process& operator<<(char ch);
57
* @brief Closes read channel.
59
void closeReadChannel();
62
* @brief Closes write channel.
64
void closeWriteChannel();
67
* @brief Closes read and write channel.
72
std::string m_command;
73
int m_fileDescriptors[2];
77
#endif // ----- #ifndef PROCESS_INC -----