-/* +------------------------------------+
- * | Inspire Internet Relay Chat Daemon |
- * +------------------------------------+
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://wiki.inspircd.org/Credits
+ * Copyright (C) 2011 Adam <Adam@anope.org>
+ * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ * Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
+ * Copyright (C) 2005-2009 Craig Edwards <craigedwards@brainbox.cc>
+ * Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
+ * Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
*
- * This program is free but copyrighted software; see
- * the file COPYING for details.
+ * This file is part of InspIRCd. InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
*
- * ---------------------------------------------------
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _HASHCOMP_H_
-#define _HASHCOMP_H_
+
+#ifndef HASHCOMP_H
+#define HASHCOMP_H
#include <cstring>
#include <string>
* Case sensitivity is ignored, and the RFC 'character set'
* is adhered to
*/
- struct StrHashComp
+ struct CoreExport StrHashComp
{
/** The operator () does the actual comparison in hash_map
*/
/** Compose a hex string from raw data.
* @param raw The raw data to compose hex from
- * @pram rawsz The size of the raw data buffer
+ * @param rawsz The size of the raw data buffer
* @return The hex string.
*/
CoreExport std::string hex(const unsigned char *raw, size_t rawsz);
* @return The new value with _ translated to space.
*/
CoreExport const char* Spacify(const char* n);
+
+ struct hash
+ {
+ /** Hash an irc::string using RFC1459 case sensitivity rules
+ * @param s A string to hash
+ * @return The hash value
+ */
+ size_t CoreExport operator()(const irc::string &s) const;
+ };
}
/* Define operators for using >> and << with irc::string to an ostream on an istream. */
}
/** Hashing stuff is totally different on vc++'s hash_map implementation, so to save a buttload of
- * #ifdefs we'll just do it all at once. Except, of course, with TR1, when it's the same as GCC.
+ * \#ifdefs we'll just do it all at once. Except, of course, with TR1, when it's the same as GCC.
*/
BEGIN_HASHMAP_NAMESPACE
};
#else
- template<> struct hash<irc::string>
- {
- /** Hash an irc::string using RFC1459 case sensitivity rules
- * @param s A string to hash
- * @return The hash value
- */
- size_t CoreExport operator()(const irc::string &s) const;
- };
-
/* XXX FIXME: Implement a hash function overriding std::string's that works with TR1! */
#ifdef HASHMAP_DEPRECATED