473,396 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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?
Jul 22 '05 #1
4 939

"JustSomeGuy" <no**@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.
Jul 22 '05 #2

"Ron Natalie" <ro*@sensor.com> wrote in message
news:3f*********************@news.newshosting.com. ..

"JustSomeGuy" <no**@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?
Jul 22 '05 #3

"JustSomeGuy" <no**@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.

Jul 22 '05 #4
"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/
Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: darwinist | last post by:
What PHP Represents There is no shortage of complaints one could make about php as a language, and although the list does shrink with each release, some of them are inherent to the origins and...
112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
23
by: chris Jangelov | last post by:
It seems that opening a link in a new window isn't considered to be good practise in xhtml 1.1. The w3c validation service does not accept it and I have to downgrade those pages to...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
4
by: atv | last post by:
Whatis the proper way to handle errors from function calls? For example, i normally have a main function, with calls to mine or c functions. Should i check for errors in the functions called...
0
by: bj | last post by:
hello is there any chance to get proper char width for class derived from user control - im working over text editing control, so i need proper width of every character for currently selected...
24
by: Massimo Soricetti | last post by:
Think for a moment: IF you were Bjarne Stroustrup in 1985 (or whenever he were doing it) writing down C++, and knowing all you know NOW of the C++ language, (pro, cons, features of today...
0
by: yogarajan | last post by:
hi all i need proper alignment my treeview looks like <checkbox>Fruits(parent)-134 <checkbox>Mango(child)-45 <checkbox>Orange(child)-45 ...
89
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.