xmscore  1.0
map.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 
10 #include <map>
11 #include <xmscore/points/ptsfwd.h>
12 #include <xmscore/stl/vector.h> // VEC_* ShrinkCapacity
13 #include <xmscore/stl/set.h> // SET_*
14 
15 namespace xms
16 {
17 // In alphabetical order
18 typedef std::map<double, double> MapDblDbl;
19 typedef std::map<double, int> MapDblInt;
20 typedef std::map<double, std::string> MapDblStr;
21 typedef std::map<int, bool> MapIntBool;
22 typedef std::map<int, double> MapIntDbl;
23 typedef std::map<int, float> MapIntFlt;
24 typedef std::map<int, float**> MapIntFlt2d;
25 typedef std::map<int, int> MapIntInt;
26 typedef std::map<int, SetInt> MapIntSetInt;
27 typedef std::map<int, std::string> MapIntStr;
28 typedef std::map<int, Pt3d> MapIntPt3d;
29 typedef std::map<int, VecDbl> MapIntVecDbl;
30 typedef std::map<int, VecFlt> MapIntVecFlt;
31 typedef std::map<int, VecFlt2d> MapIntVecFlt2d;
32 typedef std::map<int, VecInt> MapIntVecInt;
33 typedef std::map<int, MapIntDbl> MapIntMapIntDbl;
34 typedef std::map<int, MapIntFlt> MapIntMapIntFlt;
35 typedef std::map<int, MapIntInt> MapIntMapIntInt;
36 typedef std::map<Pt3d, int> MapPt3dInt;
37 typedef std::map<std::string, double> MapStrDbl;
38 typedef std::map<std::string, int> MapStrInt;
39 typedef std::map<std::string, MapIntDbl> MapStrMapIntDbl;
40 typedef std::map<std::string, std::string> MapStrStr;
41 typedef std::map<std::string, VecStr> MapStrVecStr;
42 
43 // multimaps
44 
45 typedef std::multimap<bool, int> MmapBoolInt;
46 typedef std::multimap<double, int> MmapDblInt;
47 typedef std::multimap<int, int> MmapIntInt;
48 typedef std::multimap<std::string, int> MmapStrInt;
49 
50 // Streams
51 
52 //------------------------------------------------------------------------------
57 //------------------------------------------------------------------------------
58 template <class _T, class _U>
59 std::ostream& operator<<(std::ostream& a_output, const std::map<_T, _U>& a_value)
60 {
61  a_output << ",size=" << a_value.size();
62  // add loop here like std::vector
63  return a_output;
64 }
65 
66 //------------------------------------------------------------------------------
71 //------------------------------------------------------------------------------
72 template <class _T, class _U>
73 std::ostream& operator<<(std::ostream& a_output, const std::multimap<_T, _U>& a_value)
74 {
75  a_output << ",size=" << a_value.size();
76  // add loop here like std::vector above
77  return a_output;
78 }
79 
80 } // namespace xms
Include this small header instead of pt.h.
std::map< std::string, std::string > MapStrStr
short rename
Definition: map.h:40
std::multimap< std::string, int > MmapStrInt
short rename
Definition: map.h:48
std::multimap< int, int > MmapIntInt
short rename
Definition: map.h:47
std::set types for convenience
std::map< int, float > MapIntFlt
short rename
Definition: map.h:23
std::map< int, SetInt > MapIntSetInt
short rename
Definition: map.h:26
std::map< int, double > MapIntDbl
short rename
Definition: map.h:22
std::multimap< bool, int > MmapBoolInt
short rename
Definition: map.h:45
std::map< int, VecInt > MapIntVecInt
short rename
Definition: map.h:32
std::map< int, VecFlt2d > MapIntVecFlt2d
short rename
Definition: map.h:31
std::multimap< double, int > MmapDblInt
short rename
Definition: map.h:46
std::map< int, Pt3d > MapIntPt3d
short rename
Definition: map.h:28
std::map< std::string, int > MapStrInt
short rename
Definition: map.h:38
std::map< int, MapIntDbl > MapIntMapIntDbl
short rename
Definition: map.h:33
std::map< double, std::string > MapDblStr
short rename
Definition: map.h:20
std::map< int, std::string > MapIntStr
short rename
Definition: map.h:27
std::map< std::string, MapIntDbl > MapStrMapIntDbl
short rename
Definition: map.h:39
std::map< int, int > MapIntInt
short rename
Definition: map.h:25
std::map< int, MapIntFlt > MapIntMapIntFlt
short rename
Definition: map.h:34
Vector types for convenience.
std::map< std::string, double > MapStrDbl
short rename
Definition: map.h:37
std::map< Pt3d, int > MapPt3dInt
short rename
Definition: map.h:36
std::map< int, bool > MapIntBool
short rename
Definition: map.h:21
std::map< double, int > MapDblInt
short rename
Definition: map.h:19
std::map< int, MapIntInt > MapIntMapIntInt
short rename
Definition: map.h:35
std::map< std::string, VecStr > MapStrVecStr
short rename
Definition: map.h:41
std::map< double, double > MapDblDbl
short rename
Definition: map.h:18
std::map< int, VecDbl > MapIntVecDbl
short rename
Definition: map.h:29
std::map< int, float ** > MapIntFlt2d
short rename
Definition: map.h:24
std::map< int, VecFlt > MapIntVecFlt
short rename
Definition: map.h:30