]> Creatis software - gdcm.git/blob - Testing/TestHash.cxx
* Truckload of changes. Parsing of header is barely functional
[gdcm.git] / Testing / TestHash.cxx
1 #include <map>
2 #include <string>
3 #include <iostream>
4
5 int main()
6 {
7   typedef map<string, char*> dict;
8   
9   dict current;
10         dict::iterator im = current.find("00380010");
11   current["00100010"] = "Patient Name";
12   current["7fe00010"] = "Pixel Data";
13   current["50000010"] = "Number of points";
14   current["00380010"] = "Admission ID";
15
16         cout << "Traversal of dictionary (note the proper ordering on key)." << endl;
17         for ( dict::iterator im = current.begin(); im != current.end(); ++im )
18                 cout << "   \"" << im->first << "\" = " << im->second << endl;
19         cout << "End of dictionary." << endl;
20
21         cout << "Find request on key 00380010" << endl;
22         im = current.find("00380010");
23         cout << "   \"" << im->first << "\" = " << im->second << endl;
24 }