Add ostream support for PropertyStream items

This commit is contained in:
Vinnie Falco
2013-11-04 00:00:22 -08:00
parent 206169476f
commit b560f5a474
2 changed files with 36 additions and 1 deletions

View File

@@ -62,6 +62,25 @@ PropertyStream::Proxy::Proxy (
{
}
PropertyStream::Proxy::Proxy (Proxy const& other)
: m_map (other.m_map)
, m_key (other.m_key)
{
}
PropertyStream::Proxy::~Proxy ()
{
std::string const s (m_ostream.str());
if (! s.empty())
m_map->add (m_key, s);
}
std::ostream& PropertyStream::Proxy::operator<< (
std::ostream& manip (std::ostream&)) const
{
return m_ostream << manip;
}
//------------------------------------------------------------------------------
//
// Map