temporal: add additional required string_to/to_string functions for BBT_Offset & BBT_Time
This commit is contained in:
parent
c3a48ff9c9
commit
9b5e910717
@ -350,6 +350,14 @@ inline bool to_string (Temporal::BBT_Time val, std::string & str)
|
||||
return true;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline std::string to_string (Temporal::BBT_Time val)
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << val;
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool string_to (std::string const & str, Temporal::BBT_Time & val)
|
||||
{
|
||||
@ -358,6 +366,14 @@ inline bool string_to (std::string const & str, Temporal::BBT_Time & val)
|
||||
return (bool) istr;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline Temporal::BBT_Time string_to (std::string const & str)
|
||||
{
|
||||
Temporal::BBT_Time tmp;
|
||||
string_to (str, tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool to_string (Temporal::BBT_Offset val, std::string & str)
|
||||
{
|
||||
@ -367,6 +383,14 @@ inline bool to_string (Temporal::BBT_Offset val, std::string & str)
|
||||
return true;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline std::string to_string (Temporal::BBT_Offset val)
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << val;
|
||||
return ostr.str();
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool string_to (std::string const & str, Temporal::BBT_Offset & val)
|
||||
{
|
||||
@ -375,6 +399,14 @@ inline bool string_to (std::string const & str, Temporal::BBT_Offset & val)
|
||||
return (bool) istr;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline Temporal::BBT_Offset string_to (std::string const & str)
|
||||
{
|
||||
Temporal::BBT_Offset tmp;
|
||||
string_to (str, tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
} /* end namespace PBD */
|
||||
|
||||
#endif /* __libtemporal_bbt_time_h__ */
|
||||
|
Loading…
Reference in New Issue
Block a user