hash.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Point Cloud Library (PCL) - www.pointclouds.org
00005  *  Copyright (c) 2009-2012, Willow Garage, Inc.
00006  *  Copyright (c) 2006, Michael Kazhdan and Matthew Bolitho,
00007  *                      Johns Hopkins University
00008  *
00009  *  All rights reserved.
00010  *
00011  *  Redistribution and use in source and binary forms, with or without
00012  *  modification, are permitted provided that the following conditions
00013  *  are met:
00014  *
00015  *   * Redistributions of source code must retain the above copyright
00016  *     notice, this list of conditions and the following disclaimer.
00017  *   * Redistributions in binary form must reproduce the above
00018  *     copyright notice, this list of conditions and the following
00019  *     disclaimer in the documentation and/or other materials provided
00020  *     with the distribution.
00021  *   * Neither the name of Willow Garage, Inc. nor the names of its
00022  *     contributors may be used to endorse or promote products derived
00023  *     from this software without specific prior written permission.
00024  *
00025  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00027  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00028  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00029  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00030  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00031  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00032  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00033  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00034  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00035  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  *  POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * $Id: hash.h 5170 2012-03-18 04:21:56Z rusu $
00039  *
00040  */
00041 
00042 #ifndef PCL_POISSON_HASH_H_
00043 #define PCL_POISSON_HASH_H_
00044 
00045 
00046 #ifdef WIN32
00047 #include <hash_map>
00048 using namespace stdext;
00049 #else // !WIN32
00050 #define _GLIBCXX_PERMIT_BACKWARD_HASH
00051 #include <ext/hash_map>
00052 using namespace __gnu_cxx;
00053 
00054 namespace __gnu_cxx
00055 {
00056   template<>
00057   struct hash<long long>
00058   {
00059     size_t
00060     operator() (long long __x) const
00061     {
00062       return (static_cast<size_t> (__x));
00063     }
00064   };
00065 
00066   template<>
00067   struct hash<const long long>
00068   {
00069     size_t
00070     operator() (const long long __x) const
00071     {
00072       return (static_cast<size_t> (__x));
00073     }
00074   };
00075 
00076   template<>
00077   struct hash<unsigned long long>
00078   {
00079     size_t
00080     operator() (unsigned long long __x) const
00081     {
00082       return (static_cast<size_t> (__x));
00083     }
00084   };
00085 
00086   template<>
00087   struct hash<const unsigned long long>
00088   {
00089     size_t
00090     operator() (const unsigned long long __x) const
00091     {
00092       return (static_cast<size_t> (__x));
00093     }
00094   };
00095 }
00096 #endif // WIN32
00097 
00098 #endif /* PCL_POISSON_HASH_H_ */
00099 


pcl
Author(s): Open Perception
autogenerated on Mon Oct 6 2014 03:15:24