I have a function in C++ that takes in an std::istream as the input:
class Foo {
Foo(std::istream &);
}
Using SWIG, I've bound it to Ruby, but Ruby's $stdin variable is fundamentally different from anything like the stream classes in C++, so I'm not sure how to either 1) expose the C++ class to Ruby in a way that I can use $stdin, or 2) convert $stdin into something the C++ class can understand.
Anyone have experience with binding iostreams in C++ to Ruby?
Thanks.