FEI Version of the Day
Loading...
Searching...
No Matches
snl_fei_MapTraits_specialize.hpp
1#ifndef _snl_fei_MapTraits_specialize_hpp_
2#define _snl_fei_MapTraits_specialize_hpp_
3
4/*--------------------------------------------------------------------*/
5/* Copyright 2005 Sandia Corporation. */
6/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7/* non-exclusive license for use of this work by or on behalf */
8/* of the U.S. Government. Export of this program may require */
9/* a license from the United States Government. */
10/*--------------------------------------------------------------------*/
11
12#include <fei_macros.hpp>
13
14#include <snl_fei_MapTraits.hpp>
15#include <snl_fei_MapContig.hpp>
16
17namespace snl_fei {
18#if defined(FEI_HASH_MAP) && defined(FEI_HASH_SET)
19template<>
20struct MapTraits<FEI_HASH_MAP<int,FEI_HASH_SET<int>*> > {
21 static FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::iterator
22 lower_bound(FEI_HASH_MAP<int,FEI_HASH_SET<int>*>& map_obj,
23 int item)
24 { return( map_obj.find(item) ); }
25
26 static void insert(FEI_HASH_MAP<int,FEI_HASH_SET<int>*>& map_obj,
27 FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::iterator& pos,
28 FEI_HASH_MAP<int,FEI_HASH_SET<int>*>::value_type& val)
29 { map_obj.insert(val); }
30};
31#endif
32
33#if defined(FEI_HASH_MAP)
34
35template<>
36struct MapTraits<FEI_HASH_MAP<int,fei::ctg_set<int>*> >
37{
38 static FEI_HASH_MAP<int,fei::ctg_set<int>*>::iterator
39 lower_bound(FEI_HASH_MAP<int,fei::ctg_set<int>*>& map_obj, int item)
40 { return( map_obj.find(item) ); }
41
42 static void insert(FEI_HASH_MAP<int,fei::ctg_set<int>*>& map_obj,
43 FEI_HASH_MAP<int,fei::ctg_set<int>*>::iterator& pos,
44 FEI_HASH_MAP<int,fei::ctg_set<int>*>::value_type& val)
45 { map_obj.insert(val); }};
46
47template<>
48struct MapTraits<FEI_HASH_MAP<int,std::set<int>*> > {
49 static FEI_HASH_MAP<int,std::set<int>*>::iterator
50 lower_bound(FEI_HASH_MAP<int,std::set<int>*>& map_obj,
51 int item)
52 { return( map_obj.find(item) ); }
53
54 static void insert(FEI_HASH_MAP<int,std::set<int>*>& map_obj,
55 FEI_HASH_MAP<int,std::set<int>*>::iterator& pos,
56 FEI_HASH_MAP<int,std::set<int>*>::value_type& val)
57 { map_obj.insert(val); }
58};
59#endif
60
61}//namespace snl_fei
62#endif
63
static void insert(MAP_TYPE &map_obj, typename MAP_TYPE::iterator &pos, typename MAP_TYPE::value_type &val)
static MAP_TYPE::iterator lower_bound(MAP_TYPE &map_obj, typename MAP_TYPE::key_type item)