On Tue, Aug 31, 2004 at 01:33:12AM +0200, Samuel Krempp wrote:
... Does this solution fit you ? ... Is it what you'd need ?
It really is just a question of style, and as you pointed out, there are other solutions more cursory, and perhaps better suited to the task. My main question is whether this "feature" were considered before, whether it would add to the utility of the class.
There's already an undocumented member function, 'modify_item', that applies a manipulator to one "format item", so 'stick' would just have to do the same, except for all the items. The only problem is : it's only able to clone the manipulator's effects on *standard* stream parameters, while a user-defined manipulator could very well act on unknown user-defined stream parmaters (think xalloc, etc..). So such a feature would have to be documented along with the details on its limits, and interfaces full of functions-with-special-cases are better avoided IMO.
Indeed.
Anyway I need to take some time and finally document the undocumented functions (modify_item, bind_arg, etc..), and then I might add a 'stick' function along those.
In the meantime, you can use the 'modify_item' function to define an external 'stick' function.
Certainly, thanks for the direction. Forasmuch I might as well store these numbers as objects that know their own accuracy and error too. Justin