Topic: CUSTOM STREAM MANIPULATOR


Author: adam.clarke@toronto.can.ipguild.org
Date: Sun, 24 Jul 94 23:47:18 -0500
Raw View
N >I need to change the existing manipulators (I am also adding some cust
N >ones, but that is not a problem), but since the existing ostream
N >operators return ostream (of course) my manipulators will not be calle
N >
Why not just override all the ostream operators with something like:

inline qvtstream _FAR &  qvtstream::operator<< (int i)
{
 return (qvtstream&)ostream::operator << i;
}

by using inline functions, no extra code should be generated, but the
desired manipulator is called. Albeit a bit messy in the header files, but
I believe it would allow you to have a whole host of different
manipulators called intuitively for each type of stream.

---
     WinQwk 1.30 #0     Unregistered Evaluation Copy