Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > What is the proper way to do this...

Reply
Thread Tools

What is the proper way to do this...

 
 
JustSomeGuy
Guest
Posts: n/a
 
      12-22-2003
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?


 
Reply With Quote
 
 
 
 
Ron Natalie
Guest
Posts: n/a
 
      12-22-2003

"JustSomeGuy" <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
JustSomeGuy
Guest
Posts: n/a
 
      12-22-2003

"Ron Natalie" <(E-Mail Removed)> wrote in message
news:3fe6fc6e$0$407$(E-Mail Removed). ..
>
> "JustSomeGuy" <(E-Mail Removed)> 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?


 
Reply With Quote
 
Ron Natalie
Guest
Posts: n/a
 
      12-22-2003

"JustSomeGuy" <(E-Mail Removed)> 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.

 
Reply With Quote
 
Derek
Guest
Posts: n/a
 
      12-22-2003
"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/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proper way to upgrade Thunderbird 1.0 to 1.0.2? Z Firefox 2 03-27-2005 01:04 AM
Proper way to install the Bird & the Fox? @micro$oft.linuxworx Firefox 0 04-25-2004 04:22 AM
Proper way of destroying unused session objects NETUser2004 ASP .Net 3 02-10-2004 05:05 AM
Proper Way to work with SQL Connections Brandon Potter ASP .Net 1 01-23-2004 07:40 PM
Re: What is a proper way to set up smtp Steve C. Orr, MCSD ASP .Net 1 07-03-2003 11:23 AM



Advertisments