home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!hela.iti.org!ais.org!roofus!empath
- Message-ID: <765346d7371303t1@roofus.ann-arbor.mi.us>
- Date: Saturday, 2 January 1993 20:24:14 EST
- X-Mailer: TMail version 1.14R
- From: "Tim Triemstra" <empath@ais.org>
- Organization: Empath Software
- Subject: Creating Streams
- Newsgroups: comp.lang.c++
- Distribution: world
- Lines: 26
-
- I am interested in writing functions very similar to COUT and CIN for use
- within a GUI. Essentially, I want the functions to the exactly like
- COUT and CIN, except I want whatever information COUT or CIN would be
- piping in or out to first get piped into another function.
-
- For instance, to say COUT << "Hello\n" I would like COUT to put the
- hello as a parameter to a function called GUI_COUT or something of that
- sort. GUI_COUT would of course have to be overloaded to take strings and
- int's and whatnot - but that's not a big deal. GUI_COUT would, of course,
- use the graphical font functions to output the string or number or whatnot
- onto the screen. It would also, once complete, also keep track of the
- graphical cursor and control word-wrap and all kinds of other neat things.
-
- So, how could I do this? I assume you could just look into the source for
- the file IO and look to change some of this stuff so I could create a
- stream similar to ofstream and ifstream and create an object of that
- stream. However, as I am new to C++ and its details I'd love some info on
- it. Thanks in advance.
-
- Tim
-
- -------------------------------------------------------
- | When the end comes, there will be two men standing: |
- | Me, and the guy I gotta kill. - Gosh I'm EVIL |
- ------ Tim Triemstra ------------- empath@ais.org -----
-