![]() |
What is the proper way to do this...
I have a data stream that can come from a buffer of data, a socket or a
file. What is the correct object oriented way to process this stream such as to abstract the method from knowing where the data is comming from? |
Re: What is the proper way to do this...
"JustSomeGuy" <nope@nottelling.com> wrote in message news:joHFb.781847$pl3.49041@pd7tw3no... > I have a data stream that can come from a buffer of data, a socket or a > file. > What is the correct object oriented way to process this stream such as to > abstract the method from knowing where the data is comming from? > Create a stream buffer that handles the source-specific stuff and then create an istream that uses it. |
Re: What is the proper way to do this...
"Ron Natalie" <ron@sensor.com> wrote in message news:3fe6fc6e$0$407$9a6e19ea@news.newshosting.com. .. > > "JustSomeGuy" <nope@nottelling.com> wrote in message news:joHFb.781847$pl3.49041@pd7tw3no... > > I have a data stream that can come from a buffer of data, a socket or a > > file. > > What is the correct object oriented way to process this stream such as to > > abstract the method from knowing where the data is comming from? > > > Create a stream buffer that handles the source-specific stuff and then create > an istream that uses it. Can you give me a small example of the stream class use? If its not too much trouble? |
Re: What is the proper way to do this...
"JustSomeGuy" <nope@nottelling.com> wrote in message news:UFHFb.783652$6C4.476028@pd7tw1no... > Can you give me a small example of the stream class use? If its not too > much trouble? > It is more than I care to type in right now. I suggest you get Nick Josuttis's book: The C++ Standard Library. It covers it. |
Re: What is the proper way to do this...
"JustSomeGuy"...
> Can you give me a small example of the stream class use? If > its not too much trouble? This might help: http://www.informatik.uni-konstanz.d.../c++/iostream/ |
| All times are GMT. The time now is 03:56 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.