iostream compatibility problems
-
I am in the middle of porting one of my C++ project which is using old iostream (shipped with VC6.0) into new iostream implemented in stlport version 5.2 I found that some of the stream related methods are not available in the new iostream class. The compiler gives me error for the following methods streambuf::allocate() streambuf::doallocate() streambuf::blen() ostream::osfx() ostream::opfx() streambuf::base() streambuf::ebuf() streambuf::setb() Am I missing something? Are there any equivalent methods available in new iostream library? How can I substitute these functions when I port into new stlport/VS2008 iostream? Thanks in advance
cheers Varghese Paul
-
I am in the middle of porting one of my C++ project which is using old iostream (shipped with VC6.0) into new iostream implemented in stlport version 5.2 I found that some of the stream related methods are not available in the new iostream class. The compiler gives me error for the following methods streambuf::allocate() streambuf::doallocate() streambuf::blen() ostream::osfx() ostream::opfx() streambuf::base() streambuf::ebuf() streambuf::setb() Am I missing something? Are there any equivalent methods available in new iostream library? How can I substitute these functions when I port into new stlport/VS2008 iostream? Thanks in advance
cheers Varghese Paul
Varghese Paul M wrote:
streambuf::allocate() streambuf::doallocate() streambuf::blen() streambuf::base() streambuf::ebuf() streambuf::setb()
These all refer to the 'reserve area' of the pre-standard IOStreams streambuf. The standard basic_streambuf doesn't have this concept at all (I guess they decided it was better for that concept not to exist in an abstract stream buffer). This post[^], however, gives a suggestion for a possible solution.
Varghese Paul M wrote:
ostream::osfx() ostream::opfx()
These were functions that ran before (opfx) and after (osfx) every output operation. They've been replaced by the sentry nested class, so rather than this:
if (os.opfx()) { os.do_something(); }
os.osfx();you have this
std::ostream::sentry se(os);
if (se) { os.do_something(); }Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p