mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
move freestanding friend function definitions out of class
This commit is contained in:
@@ -48,10 +48,10 @@ public:
|
|||||||
|
|
||||||
const std::string& localName() const;
|
const std::string& localName() const;
|
||||||
/// Returns the local part of the name.
|
/// Returns the local part of the name.
|
||||||
|
|
||||||
const std::string& prefix() const;
|
const std::string& prefix() const;
|
||||||
/// Returns the namespace prefix of the name.
|
/// Returns the namespace prefix of the name.
|
||||||
|
|
||||||
std::string& namespaceURI();
|
std::string& namespaceURI();
|
||||||
/// Returns the namespace URI part of the name.
|
/// Returns the namespace URI part of the name.
|
||||||
|
|
||||||
@@ -63,22 +63,11 @@ public:
|
|||||||
|
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
/// Returns a printable representation in the [<namespace>#]<name> form.
|
/// Returns a printable representation in the [<namespace>#]<name> form.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
friend bool operator < (const QName& x, const QName& y)
|
friend bool operator < (const QName& x, const QName& y);
|
||||||
{
|
friend bool operator == (const QName& x, const QName& y);
|
||||||
return x._ns < y._ns || (x._ns == y._ns && x._name < y._name);
|
friend bool operator != (const QName& x, const QName& y);
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator == (const QName& x, const QName& y)
|
|
||||||
{
|
|
||||||
return x._ns == y._ns && x._name == y._name;
|
|
||||||
}
|
|
||||||
|
|
||||||
friend bool operator != (const QName& x, const QName& y)
|
|
||||||
{
|
|
||||||
return !(x == y);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _ns;
|
std::string _ns;
|
||||||
@@ -129,6 +118,24 @@ inline std::string& QName::prefix()
|
|||||||
XML_API std::ostream& operator << (std::ostream&, const QName&);
|
XML_API std::ostream& operator << (std::ostream&, const QName&);
|
||||||
|
|
||||||
|
|
||||||
|
inline bool operator < (const QName& x, const QName& y)
|
||||||
|
{
|
||||||
|
return x._ns < y._ns || (x._ns == y._ns && x._name < y._name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool operator == (const QName& x, const QName& y)
|
||||||
|
{
|
||||||
|
return x._ns == y._ns && x._name == y._name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool operator != (const QName& x, const QName& y)
|
||||||
|
{
|
||||||
|
return !(x == y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::XML
|
} } // namespace Poco::XML
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user