RE: [boost] FORMAL Review of "Output Formatter" library - 7 days left

Although my library is still under review, I am re-architecturing it based on the feedback thus far. This post is the code associated with what was the delimiters/formatters part of the library. They are now given the better name of "decorators". io::decoration< CharT, id > [formatter/impl/decoration.hpp] -- a decoration is a property-like object that provides the value (as a std::basic_string< CharT > object) associated with a particular decorator id. The id dictates the decoration type. Currently there are three types: open ( 0 ); close ( 1 ); and separator ( 2 ). You can use a decoration like this: io::decoration< char, 0 > decor; // empty decorator std::cout << decor(); // get value: decor == std::string(); std::cout << decor( std::cout ); // get value associated with the stream == "[ " decor = "[{ "; // provide a custom decoration value io::decorate< CharT > [formatter/impl/decorate.hpp] -- controls the open, close and separator values on a stream. There are typedefs for char and wchar_t streams: std::cout << io::cdecorate( "<< ", " >>" ); // override stream decorator defaults NOTE: io::decorate will only accept const CharT * types. This is because pword (used to implement the stream decorator defaults) is not dependant on CharT, so it is complex (if not impossible) to allocate an object based on the CharT value of a templated stream object. io::wrapper_decorators< CharT > [formatter/impl/wrapper_decorators.hpp] -- stores open/close decoration values allowing you to control their values using the decorate() function. io::sequence_decorators< CharT > [formatter/impl/sequence_decorators.hpp] -- stores open/close/separator decoration values allowing you to control their values using the decorate() function. Derives from io::wrapper_decorators< CharT >. Regards, Reece _________________________________________________________________ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ ***************************************************************************** ** ** ** WARNING: This email contains an attachment of a very suspicious type. ** ** You are urged NOT to open this attachment unless you are absolutely ** ** sure it is legitmate. Opening this attachment may cause irreparable ** ** damage to your computer and your files. If you have any questions ** ** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT. ** ** ** ** This warning was added by the IU Computer Science Dept. mail scanner. ** *****************************************************************************

"Reece Dunn" <msclrhd@hotmail.com> wrote in message news:BAY24-F288Jecd92bXC000d4659@hotmail.com...
Although my library is still under review, I am re-architecturing it based on the feedback thus far. This post is the code associated with what was the delimiters/formatters part of the library. They are now given the better name of "decorators".
Hi Reece, I'm planning to post a review [ favorable, presumably ;-) ], but haven't started to read the thread yet. I'm sorry I was never able to follow through on my ideas for your library -- I just got too busy with other things. If there you feel there are some major architectural changes that need to be made, I'm still interested in collaborating. My main ideas were a introducing cascading style sheets and inline formatters using expression templates. Best Regards, Jonathan

I'm sorry I was never able to follow through on my ideas for your library -- I just got too busy with other things. If there you feel there are some major architectural changes that need to be made, I'm still interested in collaborating. My main ideas were a introducing cascading style sheets and inline formatters using expression templates.
"cascading style sheets" - now there's a really cool concept! However, not sure how achievable it is... Best, John -- John Torjo -- john@torjo.com 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)

On Fri, Sep 17, 2004 at 10:23:22AM +0200, John Torjo wrote:
"cascading style sheets" - now there's a really cool concept! However, not sure how achievable it is...
Sorry, I've not been following this thread at all - so I guess I shouldn't reply to it at this point... But reading this I was thinking: that would be possible if the 'cascading' == 'inheritance', and therefore when stream manipulators are member functions of a class. All in all, just to mention its existance for your (author of Output Formatter) information; I wrote something too in the past, the docs of which are here: http://libcw.sourceforge.net/io/iomanip.html (Yeah, libcw again ;). -- Carlo Wood <carlo@alinoe.com>

Hi Reece, Maybe you can show more about this after the review is over. It's good that boosters now know you've already started to improve the lib based on feedback, but for now, I think it's better for them to focus feedback on the existing lib: http://www.torjo.com/code/outfmt.zip Or maybe I'm just plain wrong ;) Best, John
Although my library is still under review, I am re-architecturing it based on the feedback thus far. This post is the code associated with what was the delimiters/formatters part of the library. They are now given the better name of "decorators".
-- John Torjo -- john@torjo.com 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)
participants (4)
-
Carlo Wood
-
John Torjo
-
Jonathan Turkanis
-
Reece Dunn