26 |
|
bool operator==(const Buddy& buddy) const { return login == buddy.login; } |
27 |
|
bool operator<(const Buddy& buddy) const { return login < buddy.login; } |
28 |
|
operator const ext::String&() const { return login; } |
29 |
– |
// friends: |
30 |
– |
friend std::ostream& operator<<(std::ostream& sout, const Buddy& buddy); |
29 |
|
}; |
30 |
|
|
31 |
+ |
inline ext::String operator+(const Buddy& buddy, const ext::String& string) |
32 |
+ |
{ |
33 |
+ |
return ext::String(buddy) + string; |
34 |
+ |
} |
35 |
+ |
|
36 |
+ |
inline ext::String operator+(const ext::String& string, const Buddy& buddy) |
37 |
+ |
{ |
38 |
+ |
return string + ext::String(buddy); |
39 |
+ |
} |
40 |
+ |
|
41 |
+ |
inline ext::String operator+(const ext::Uuid& uuid, const ext::String& string) |
42 |
+ |
{ |
43 |
+ |
return lexical_cast<ext::String>(uuid) + string; |
44 |
+ |
} |
45 |
+ |
|
46 |
+ |
inline ext::String operator+(const ext::String& string, const ext::Uuid& uuid) |
47 |
+ |
{ |
48 |
+ |
return string + lexical_cast<ext::String>(uuid); |
49 |
+ |
} |
50 |
+ |
|
51 |
+ |
inline std::ostream& operator<<(std::ostream& sout, const Buddy& buddy) |
52 |
+ |
{ |
53 |
+ |
return sout << ext::String(buddy); |
54 |
+ |
} |
55 |
+ |
|
56 |
|
#endif // _Buddy_hpp_ |