summaryrefslogtreecommitdiff
path: root/docs/module-doc/hashcomp_8h-source.html
blob: 0872e69c6b7691deafabe803a0577edeafe71bc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>InspIRCd: hashcomp.h Source File</title>
<link href="inspircd.doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>hashcomp.h</h1><a href="hashcomp_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*       +------------------------------------+</span>
00002 <span class="comment"> *       | Inspire Internet Relay Chat Daemon |</span>
00003 <span class="comment"> *       +------------------------------------+</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.</span>
00006 <span class="comment"> *                       E-mail:</span>
00007 <span class="comment"> *                &lt;brain@chatspike.net&gt;</span>
00008 <span class="comment"> *                &lt;Craig@chatspike.net&gt;</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * Written by Craig Edwards, Craig McLure, and others.</span>
00011 <span class="comment"> * This program is free but copyrighted software; see</span>
00012 <span class="comment"> *            the file COPYING for details.</span>
00013 <span class="comment"> *</span>
00014 <span class="comment"> * ---------------------------------------------------</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="preprocessor">#ifndef _HASHCOMP_H_</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define _HASHCOMP_H_</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include "inspircd_config.h"</span>
00021 
00022 <span class="preprocessor">#ifdef GCC3</span>
00023 <span class="preprocessor"></span><span class="preprocessor">#include &lt;ext/hash_map&gt;</span>
00024 <span class="preprocessor">#else</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#include &lt;hash_map&gt;</span>
00026 <span class="preprocessor">#endif</span>
00027 <span class="preprocessor"></span>
00028 <span class="preprocessor">#ifdef GCC3</span>
<a name="l00029"></a><a class="code" href="hashcomp_8h.html#a0">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define nspace __gnu_cxx</span>
00030 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00031 <span class="preprocessor"></span><span class="preprocessor">#define nspace std</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00033 <span class="preprocessor"></span>
00034 <span class="keyword">using</span> <span class="keyword">namespace </span>std;
00035 
<a name="l00036"></a><a class="code" href="namespacenspace.html">00036</a> <span class="keyword">namespace </span><a class="code" href="channels_8cpp.html#a0">nspace</a>
00037 {
00038 <span class="preprocessor">#ifdef GCC34</span>
00039 <span class="preprocessor"></span>        <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>hash&lt;in_addr&gt;
00040 #else
<a name="l00041"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html">00041</a>         template&lt;&gt; struct <a class="code" href="channels_8cpp.html#a0">nspace</a>::hash&lt;in_addr&gt;
00042 #endif
00043         {
00044                 size_t operator()(<span class="keyword">const</span> <span class="keyword">struct</span> in_addr &amp;a) <span class="keyword">const</span>;
00045         };
00046 <span class="preprocessor">#ifdef GCC34</span>
00047 <span class="preprocessor"></span>        <span class="keyword">template</span>&lt;&gt; <span class="keyword">struct </span>hash&lt;<a class="code" href="namespaceirc.html#a0">string</a>&gt;
00048 #else
<a name="l00049"></a><a class="code" href="structnspace_1_1nspace_1_1hash_3_01string_01_4.html">00049</a>         template&lt;&gt; struct <a class="code" href="channels_8cpp.html#a0">nspace</a>::hash&lt;string&gt;
00050 #endif
00051         {
00052                 size_t operator()(<span class="keyword">const</span> <a class="code" href="namespaceirc.html#a0">string</a> &amp;s) <span class="keyword">const</span>;
00053         };
00054 }
00055 
<a name="l00058"></a><a class="code" href="namespaceirc.html">00058</a> <span class="keyword">namespace </span>irc
00059 {
00060 
<a name="l00065"></a><a class="code" href="structirc_1_1StrHashComp.html">00065</a>         <span class="keyword">struct </span><a class="code" href="structirc_1_1StrHashComp.html">StrHashComp</a>
00066         {
00069                 <span class="keywordtype">bool</span> <a class="code" href="structirc_1_1StrHashComp.html#a0">operator()</a>(<span class="keyword">const</span> std::string&amp; s1, <span class="keyword">const</span> std::string&amp; s2) <span class="keyword">const</span>;
00070         };
00071 
00072 
<a name="l00077"></a><a class="code" href="structirc_1_1InAddr__HashComp.html">00077</a>         <span class="keyword">struct </span><a class="code" href="structirc_1_1InAddr__HashComp.html">InAddr_HashComp</a>
00078         {
00081                 <span class="keywordtype">bool</span> <a class="code" href="structirc_1_1InAddr__HashComp.html#a0">operator()</a>(<span class="keyword">const</span> in_addr &amp;s1, <span class="keyword">const</span> in_addr &amp;s2) <span class="keyword">const</span>;
00082         };
00083 
00084 
<a name="l00089"></a><a class="code" href="structirc_1_1irc__char__traits.html">00089</a>         <span class="keyword">struct </span><a class="code" href="structirc_1_1irc__char__traits.html">irc_char_traits</a> : std::char_traits&lt;char&gt; {
00090 
00093                 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structirc_1_1irc__char__traits.html#e0">eq</a>(<span class="keywordtype">char</span> c1st, <span class="keywordtype">char</span> c2nd);
00094 
00097                 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structirc_1_1irc__char__traits.html#e1">ne</a>(<span class="keywordtype">char</span> c1st, <span class="keywordtype">char</span> c2nd);
00098 
00101                 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structirc_1_1irc__char__traits.html#e2">lt</a>(<span class="keywordtype">char</span> c1st, <span class="keywordtype">char</span> c2nd);
00102 
00105                 <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="structirc_1_1irc__char__traits.html#e3">compare</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* str1, <span class="keyword">const</span> <span class="keywordtype">char</span>* str2, size_t n);
00106 
00109                 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structirc_1_1irc__char__traits.html#e4">find</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* s1, <span class="keywordtype">int</span>  n, <span class="keywordtype">char</span> c);
00110         };
00111 
<a name="l00114"></a><a class="code" href="namespaceirc.html#a0">00114</a>         <span class="keyword">typedef</span> basic_string&lt;char, irc_char_traits, allocator&lt;char&gt; &gt; <a class="code" href="namespaceirc.html#a0">string</a>;
00115 }
00116 
00117 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun May 15 18:36:01 2005 for InspIRCd by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.3 </small></address>
</body>
</html>