$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2008-07-08 11:15:41
Joshua Perry <josh <at> 6bit.com> writes:
> Now that I have the streams, I have a class that communicates with the device
and I would like to construct or initialize an object of that class with any one
of the streams. I have yet to figure out how to form the constructor/function
parameter to allow this.
>
> I've tried something like this, a stream of the base type of my devices:
> void init( stream< device<bidirectional> > str);
Something like this?
struct foo
{
void init(std::iostream& strm)
{
m_strm = &strm;
}
private:
std::iostream* m_strm;
};
Roman Perepelitsa.