libtemporal: add maybe-not-required operator>> for timeline types
This commit is contained in:
parent
322bca7fb3
commit
4e6c06bc95
|
@ -426,12 +426,11 @@ class LIBTEMPORAL_API timecnt_t {
|
|||
|
||||
} /* end namespace Temporal */
|
||||
|
||||
|
||||
namespace std {
|
||||
std::ostream& operator<< (std::ostream & o, Temporal::timecnt_t const & tc);
|
||||
std::ostream& operator>> (std::istream & o, Temporal::timecnt_t const & tc);
|
||||
std::istream& operator>> (std::istream & o, Temporal::timecnt_t & tc);
|
||||
std::ostream& operator<< (std::ostream & o, Temporal::timepos_t const & tp);
|
||||
std::ostream& operator>> (std::istream & o, Temporal::timepos_t const & tp);
|
||||
std::istream& operator>> (std::istream & o, Temporal::timepos_t & tp);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -365,6 +365,16 @@ std::operator<< (std::ostream & o, timecnt_t const & tc)
|
|||
return o << tc.to_string();
|
||||
}
|
||||
|
||||
std::istream&
|
||||
std::operator>> (std::istream & o, timecnt_t & tc)
|
||||
{
|
||||
std::string str;
|
||||
o >> str; /* will break at whitespace */
|
||||
tc.string_to (str);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
/* timepos */
|
||||
|
||||
timepos_t::timepos_t (timecnt_t const & t)
|
||||
|
@ -739,6 +749,15 @@ std::operator<< (std::ostream & o, timepos_t const & tp)
|
|||
return o << tp.to_string();
|
||||
}
|
||||
|
||||
std::istream&
|
||||
std::operator>> (std::istream & o, timepos_t & tp)
|
||||
{
|
||||
std::string str;
|
||||
o >> str; /* should break on whitespace */
|
||||
tp.string_to (str);
|
||||
return o;
|
||||
}
|
||||
|
||||
std::string
|
||||
timepos_t::to_string () const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue