Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

sgi_hash_map.h

Go to the documentation of this file.
00001 /**************************************************************************
00002 ***    
00003 *** Copyright (c) 1995-2000 Regents of the University of California,
00004 ***               Andrew E. Caldwell, Andrew B. Kahng and Igor L. Markov
00005 *** Copyright (c) 2000-2004 Regents of the University of Michigan,
00006 ***               Saurabh N. Adya, Jarrod A. Roy and Igor L. Markov
00007 ***
00008 ***  Contact author(s): abk@cs.ucsd.edu, imarkov@umich.edu
00009 ***  Original Affiliation:   UCLA, Computer Science Department,
00010 ***                          Los Angeles, CA 90095-1596 USA
00011 ***
00012 ***  Permission is hereby granted, free of charge, to any person obtaining 
00013 ***  a copy of this software and associated documentation files (the
00014 ***  "Software"), to deal in the Software without restriction, including
00015 ***  without limitation 
00016 ***  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
00017 ***  and/or sell copies of the Software, and to permit persons to whom the 
00018 ***  Software is furnished to do so, subject to the following conditions:
00019 ***
00020 ***  The above copyright notice and this permission notice shall be included
00021 ***  in all copies or substantial portions of the Software.
00022 ***
00023 *** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
00024 *** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
00025 *** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
00026 *** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00027 *** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
00028 *** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
00029 *** THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00030 ***
00031 ***
00032 ***************************************************************************/
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 #ifndef GCC_VERSION
00047 #define GCC_VERSION (__GNUC__ * 10000 \
00048         + __GNUC_MINOR__ * 100 \
00049         + __GNUC_PATCHLEVEL__)
00050 #endif
00051 
00052 #include "ABKCommon/sgi_stl_compat.h"
00053 
00054 #ifndef _SGI_HASHMAP_H
00055  #define _SGI_HASHMAP_H
00056  #ifdef __GNUC__
00057     #if( __GNUC__ >= 3)
00058       #include <ext/hash_map>
00059       #include <string>
00060       #if(GCC_VERSION >= 30100)
00061         using __gnu_cxx::hash_map;
00062         using __gnu_cxx::hash;
00063         namespace __gnu_cxx 
00064         {
00065            template<> struct hash< std::string > 
00066            {
00067              size_t operator()( const std::string& x ) const
00068              {
00069                 return hash< const char* >()( x.c_str() );
00070              }
00071            };
00072         }
00073       #else  
00074         using std::hash_map;
00075         using std::hash;
00076       #endif
00077    #else
00078     #include <hash_map>
00079     #include <string>
00080     template<> struct hash< std::string > 
00081            {
00082              size_t operator()( const std::string& x ) const
00083              {
00084                 return hash< const char* >()( x.c_str() );
00085              }
00086            };
00087    #endif
00088  #else
00089    #ifdef _MSC_VER
00090      #include<hash_map>
00091      #ifndef _ONEHASH
00092      #define _ONEHASH
00093                 template<class T> class hash : public std::hash_compare<T> {};
00094      #endif
00095           template<class A, class B, class C,class D> class hash_map : public std::hash_map<A,B,C> {};
00096    #else
00097      #include "ABKCommon/SGI_STL_COMPAT/hash_map.h" 
00098    #endif
00099  #endif
00100 #endif
00101 
00102 
00103 #include <functional>
00104 using std::equal_to;

Generated on Mon Apr 25 01:09:25 2005 for Parquete by doxygen 1.3.2