From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2002-10-18 17:52:13
xalloc, pword, iword can be used to store stuff (e.g. manipulator state)
in an internal array of a stream.
The functions are however pretty low-level and things are not easy to get
right. Storing objects which fit into a long is relatively easy, but
if this is not the case, one needs to store pointers, and memory mangament
becomes an issue.
It is possible to register callback functions
(with void register_callback ( event_callback fn, int index );)
for various events, like destruction of copy of the internal
array but again, it is kind of messy.
Has anyone dealt with this before?
Or is there someone out there who knows about iostreams and would be
interested in the task of creating some wrapping around these
functions to make them more accessible?
-- -- -- Jaakko Järvi email: jajarvi_at_[hidden] -- Post Doctoral Fellow phone: +1 (812) 855-3608 -- Pervasive Technology Labs fax: +1 (812) 855-4829 -- Indiana University, Bloomington
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk