Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-09-20 04:57:33


Hi Reece,

Read the whole CSS thread, and my oppinion is this:

The CSS should be a different library, implemented *on top of* your library.
I suggest you leave the library as is (of course - name changes, etc.
are ok ;)), and implement only enough to make it possible for CSS to be
implemented on top of your lib. Or even better, don't implement anything
more. When you want to add CSS, just create a lib on top of Output
Formatters. Then, you'll see what needs to be changed on Output
Formatters library.

As for what Dave Abrahams said (default formatting on a stream), this
could indeed be a nice addition to Output Formatters.
And it's really easy to add as well. There won't be any CSS. Just that
for every type of formatter(decorator) class (pairfmt,
containerfrmt,etc.) you can have a default stored within the stream
class. *That's all*.

When you need to use a formatter (decorator) object and it's not
provided inline (at the time of read/write), just query the stream - if
the stream has a default formatter, use that one. I think that is enough.

Best,
John

-- 
John Torjo
-- john_at_[hidden]
Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/
-- v1.4.0 - save_dlg - true binding of your data to UI controls!
    + easily add validation rules (win32gui/examples/smart_dlg)

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk