snl_fei_MapTraits_specialize.hpp

00001 #ifndef _snl_fei_MapTraits_specialize_hpp_
00002 #define _snl_fei_MapTraits_specialize_hpp_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 #include <fei_macros.hpp>
00013 
00014 #include <snl_fei_MapTraits.hpp>
00015 #include <snl_fei_MapContig.hpp>
00016 
00017 namespace snl_fei {
00018 #if defined(FEI_HASH_MAP) && defined(FEI_HASH_SET)
00019 template<>
00020 struct MapTraits<FEI_HASH_MAP<int,FEI_HASH_SET<int>*> > {
00021   static FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::iterator
00022     lower_bound(FEI_HASH_MAP<int,FEI_HASH_SET<int>*>& map_obj,
00023                 int item)
00024   { return( map_obj.find(item) ); }
00025 
00026   static void insert(FEI_HASH_MAP<int,FEI_HASH_SET<int>*>& map_obj,
00027                      FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::iterator& pos,
00028                      FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::value_type& val)
00029   { map_obj.insert(val); }
00030 };
00031 #endif
00032 
00033 #if defined(FEI_HASH_MAP)
00034 
00035 template<>
00036 struct MapTraits<FEI_HASH_MAP<int,fei::ctg_set<int>*> >
00037 {
00038   static FEI_HASH_MAP<int,fei::ctg_set<int>*>::iterator
00039     lower_bound(FEI_HASH_MAP<int,fei::ctg_set<int>*>& map_obj, int item)
00040   { return( map_obj.find(item) ); }
00041 
00042   static void insert(FEI_HASH_MAP<int,fei::ctg_set<int>*>& map_obj,
00043                      FEI_HASH_MAP<int,fei::ctg_set<int>*>::iterator& pos,
00044                      FEI_HASH_MAP<int,fei::ctg_set<int>*>::value_type& val)
00045  { map_obj.insert(val); }};
00046 
00047 template<>
00048 struct MapTraits<FEI_HASH_MAP<int,std::set<int>*> > {
00049   static FEI_HASH_MAP<int,std::set<int>*>::iterator
00050     lower_bound(FEI_HASH_MAP<int,std::set<int>*>& map_obj,
00051                 int item)
00052   { return( map_obj.find(item) ); }
00053 
00054   static void insert(FEI_HASH_MAP<int,std::set<int>*>& map_obj,
00055                      FEI_HASH_MAP<int,std::set<int>*>::iterator& pos,
00056                      FEI_HASH_MAP<int,std::set<int>*>::value_type& val)
00057   { map_obj.insert(val); }
00058 };
00059 #endif
00060 
00061 }//namespace snl_fei
00062 #endif
00063 

Generated on Wed May 12 21:30:42 2010 for FEI by  doxygen 1.4.7