diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 01:17:23 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 01:17:23 +0000 |
commit | cba65964eb899d523904e5e3c4ad097a387d4bc6 (patch) | |
tree | 8f72bb462f5a56554cceb2779150bfc7a50f03be /include/hashcomp.h | |
parent | d9d4f8fdadc06d86daba2879423e555519971868 (diff) |
Document the nspace namespace
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4906 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r-- | include/hashcomp.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index 0ca8a6fac..9ead61b6f 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -41,17 +41,35 @@ using irc::sockets::insp_aton; using irc::sockets::insp_ntoa; using irc::sockets::insp_inaddr; +/** Because of weirdness in g++, before 3.x this was namespace std. It's now __gnu_cxx. + * This is a #define'd alias. + */ namespace nspace { + /** Convert a string to lower case respecting RFC1459 + * @param n A string to lowercase + */ void strlower(char *n); + /** Hashing function to hash insp_inaddr structs + */ template<> struct hash<insp_inaddr> { + /** Hash an insp_inaddr + * @param a An insp_inaddr to hash + * @return The hash value + */ size_t operator()(const insp_inaddr &a) const; }; + /** Hashing function to hash std::string without respect to case + */ template<> struct hash<std::string> { + /** Hash a std::string using RFC1459 case sensitivity rules + * @param s A string to hash + * @return The hash value + */ size_t operator()(const string &s) const; }; } @@ -176,14 +194,12 @@ namespace irc /* Define operators for using >> and << with irc::string to an ostream on an istream. */ /* This was endless fun. No. Really. */ /* It was also the first core change Ommeh made, if anyone cares */ - std::ostream& operator<<(std::ostream &os, const irc::string &str); std::istream& operator>>(std::istream &is, irc::string &str); /* Define operators for + and == with irc::string to std::string for easy assignment * and comparison - Brain */ - std::string operator+ (std::string& leftval, irc::string& rightval); irc::string operator+ (irc::string& leftval, std::string& rightval); bool operator== (std::string& leftval, irc::string& rightval); |