Tidy up Resource::Manager APIs

This commit is contained in:
Vinnie Falco
2013-11-09 12:00:37 -08:00
parent 5f4a1917a6
commit b5f8d447a0
5 changed files with 29 additions and 15 deletions

View File

@@ -77,12 +77,12 @@ Consumer& Consumer::operator= (Consumer const& other)
return *this;
}
std::string Consumer::label ()
std::string Consumer::to_string () const
{
if (m_logic == nullptr)
return "(none)";
return m_entry->label();
return m_entry->to_string();
}
bool Consumer::admin () const
@@ -125,5 +125,11 @@ Entry& Consumer::entry()
return *m_entry;
}
std::ostream& operator<< (std::ostream& os, Consumer const& v)
{
os << v.to_string();
return os;
}
}
}