First off, I think that C++ style streaming support for logog is a
Good Idea. If done correctly it might not down the existing portions
of the library and it should also be a boon to the people who have
been taught to use << and >> for I/O operations.
That said, I think there are more than a few ways to implement the
Good Idea and we'd like to figure out how to balance out some of the
existing properties of logog with stream support...
1. logog currently compiles to nothing when it's not needed. This
suggests some kind of foray into templates to implement ostreams, as
ostream-type libraries tend to evaluate every parameter, whether
they're needed or not. See
http://stackoverflow.com/questions/760301/implementing-a-no-op-stdostream
for some other people's thoughts on this issue.
2. In C++ you get cin/wcin and cout/wcout, and you have a pretty good
idea that you want to write your output to (w)cout. But in logog,
everything's a Topic, and so the flow of messages from the ostream to
the final output is not necessarily obvious... I can imagine a sane
user wanting to use ostream-style operators on newly instanced
messages, the default filter, and any Output objects that have been
instanced at least, in addition to any custom filters that the user
has designed. To get all these cases right will probably involve
going in at the Topic class.
3. Boost::Iostreams takes an interesting approach to this problem.
So does http://www.templog.org . There are probably other ostream
style loggers I've not even heard of. All probably ought to be
considered before designing a solution for logog.
jwb
> --
> You received this message because you are subscribed to the Google Groups "Logog" group.
> To post to this group, send email to lo...@googlegroups.com.
> To unsubscribe from this group, send email to logog+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/logog?hl=en.
>
--
---
John Byrd
Gigantic Software
2102 Business Center Drive
Suite 210-D
Irvine, CA 92612-1001
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850