Move stream operators to the TagLib namespace

This commit is contained in:
Lukáš Lalinský 2012-11-11 14:44:34 +01:00
parent 9440055eb1
commit 50e616df8d
6 changed files with 47 additions and 47 deletions

View File

@ -724,7 +724,7 @@ void ByteVector::detach()
// related functions
////////////////////////////////////////////////////////////////////////////////
std::ostream &operator<<(std::ostream &s, const ByteVector &v)
std::ostream &TagLib::operator<<(std::ostream &s, const ByteVector &v)
{
for(TagLib::uint i = 0; i < v.size(); i++)
s << v[i];

View File

@ -414,12 +414,12 @@ namespace TagLib {
ByteVectorPrivate *d;
};
/*!
* \relates TagLib::ByteVector
* Streams the ByteVector \a v to the output stream \a s.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v);
}
/*!
* \relates TagLib::ByteVector
* Streams the ByteVector \a v to the output stream \a s.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::ByteVector &v);
#endif

View File

@ -811,28 +811,28 @@ void String::prepare(Type t)
// related functions
////////////////////////////////////////////////////////////////////////////////
const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2)
const TagLib::String TagLib::operator+(const TagLib::String &s1, const TagLib::String &s2)
{
String s(s1);
s.append(s2);
return s;
}
const TagLib::String operator+(const char *s1, const TagLib::String &s2)
const TagLib::String TagLib::operator+(const char *s1, const TagLib::String &s2)
{
String s(s1);
s.append(s2);
return s;
}
const TagLib::String operator+(const TagLib::String &s1, const char *s2)
const TagLib::String TagLib::operator+(const TagLib::String &s1, const char *s2)
{
String s(s1);
s.append(s2);
return s;
}
std::ostream &operator<<(std::ostream &s, const String &str)
std::ostream &TagLib::operator<<(std::ostream &s, const String &str)
{
s << str.to8Bit();
return s;

View File

@ -453,35 +453,35 @@ namespace TagLib {
StringPrivate *d;
};
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2);
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const char *s1, const TagLib::String &s2);
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const char *s2);
/*!
* \relates TagLib::String
*
* Send the string to an output stream.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::String &str);
}
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2);
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const char *s1, const TagLib::String &s2);
/*!
* \relates TagLib::String
*
* Concatenates \a s1 and \a s2 and returns the result as a string.
*/
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const char *s2);
/*!
* \relates TagLib::String
*
* Send the string to an output stream.
*/
TAGLIB_EXPORT std::ostream &operator<<(std::ostream &s, const TagLib::String &str);
#endif

View File

@ -116,7 +116,7 @@ StringList &StringList::append(const StringList &l)
// related functions
////////////////////////////////////////////////////////////////////////////////
std::ostream &operator<<(std::ostream &s, const StringList &l)
std::ostream &TagLib::operator<<(std::ostream &s, const StringList &l)
{
s << l.toString();
return s;

View File

@ -104,12 +104,12 @@ namespace TagLib {
StringListPrivate *d;
};
/*!
* \related TagLib::StringList
* Send the StringList to an output stream.
*/
std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);
}
/*!
* \related TagLib::StringList
* Send the StringList to an output stream.
*/
std::ostream &operator<<(std::ostream &s, const TagLib::StringList &l);
#endif