Goal of this library is to provide cross platform definitions of reading process stdout using std::istream and FILE* conventions and abstractions.
Coming soon as cross platform popen
.
Library provides only read stream ipstream
derived from std::istream
.
Current implementation is POSIX & libstdc++ only. Requires C++11
.
The simplest example:
#include <iostream>
#include <string>
#include "ipstream.hpp"
int main()
{
rp::ipstream stream("ls -la");
for (std::string line; std::getline(stream, line); ++i)
std::cout << line << '\n';
}