$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [explore] Library Proposal: Container Streaming
From: Brian Wood (woodbrian77_at_[hidden])
Date: 2009-12-06 02:07:53
Jeff Flinn writes:
> Regardless of the approach taken, I think this would be a useful
> facility. I've created a similar, albeit much simplified facility for
> two separate projects in the last 5 years. There've been several more
> projects that could have used the more general facilities that this lib
> offers.
I think an on line approach is helpful and we have a service that writes
Print functions based on user input --
http://webebenezer.net/cgi-bin/enrobo.cgi.
This input: (list<int>)
results in this output:
void
Print(std::ostream& so, const list<int>& abt1)
{
int indentation = 0;
so.fill(' ');
so << "\nabt1: ";
so << "list has " << abt1.size() << "\n";
indentation += 2;
list<int >::const_iterator mediator1 = abt1.begin();
list<int >::const_iterator omega1 = abt1.end();
for (; mediator1 != omega1; ++mediator1) {
so.width(indentation); so << " ";
so << (*mediator1);
so << "\n";
}
indentation -= 2;
so << std::flush;
}
Brian Wood
http://www.webEbenezer.net <http://www.webebenezer.net/>
"The Kingdom of Heaven is like a treasure hidden in the field,
which a man found and hid again; and from joy over it he
goes and sells all that he has and buys that field."