What is the proper way to do this...

Discussion in 'C++' started by JustSomeGuy, Dec 22, 2003.

  1. JustSomeGuy

    JustSomeGuy Guest

    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?
    JustSomeGuy, Dec 22, 2003
    #1
    1. Advertising

  2. JustSomeGuy

    Ron Natalie Guest

    "JustSomeGuy" <> 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.
    Ron Natalie, Dec 22, 2003
    #2
    1. Advertising

  3. JustSomeGuy

    JustSomeGuy Guest

    "Ron Natalie" <> wrote in message
    news:3fe6fc6e$0$407$...
    >
    > "JustSomeGuy" <> 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?
    JustSomeGuy, Dec 22, 2003
    #3
  4. JustSomeGuy

    Ron Natalie Guest

    "JustSomeGuy" <> 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.
    Ron Natalie, Dec 22, 2003
    #4
  5. JustSomeGuy

    Derek Guest

    Derek, Dec 22, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve C. Orr, MCSD

    Re: What is a proper way to set up smtp

    Steve C. Orr, MCSD, Jul 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    358
    jaekim
    Jul 3, 2003
  2. Brandon Potter

    Proper Way to work with SQL Connections

    Brandon Potter, Jan 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    353
    Kevin Spencer
    Jan 23, 2004
  3. NETUser2004
    Replies:
    3
    Views:
    468
    John Saunders
    Feb 10, 2004
  4. Flip
    Replies:
    4
    Views:
    430
  5. Flip
    Replies:
    3
    Views:
    7,164
Loading...

Share This Page