proj home

Files   Classes   Functions   Hierarchy  

cfcontainerhashtest.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 using namespace std;
00003 
00004 #include <cfcontainerhash.h>
00005 #include <cfcontainerhashtest.h>
00006 
00007 string cfcontainerhashtest::doc[] = 
00008 {
00009   "",
00010   ""
00011 };
00012 
00013 void cfcontainerhashtest::test01()
00014 {
00015 
00016   cfcontainerhash h1;
00017 
00018   vector<compilationfile> vcf;
00019 
00020   vcf.push_back(compilationfile("../vrml/vrmlshapeparse.h"));
00021   vcf.push_back(compilationfile("../vrml/vrmlshapeparse.cpp"));
00022   vcf.push_back(compilationfile("../vrml/vrmlconvert.h"));
00023   vcf.push_back(compilationfile("../graphicslib/graphmisc.h"));
00024   vcf.push_back(compilationfile("../misclib/commandline.h"));
00025   vcf.push_back(compilationfile("../vrml/vrmlconvert.cpp"));
00026 
00027   h1.add(&vcf[0]);
00028   h1.add(&vcf[2]);
00029   h1.add(&vcf[3]);
00030 
00031   cout << "Adding a element twice." << endl;
00032 
00033   h1.add(&vcf[3]);
00034   h1.add(&vcf[1]);
00035   h1.add(&vcf[4]);
00036   h1.add(&vcf[5]);
00037 /*
00038   h1.add(&vcf[1]);
00039   h1.add(&vcf[3]);
00040 */
00041 
00042   cout << "Printing the hash container." << endl;
00043   for (h1.reset(); !h1; ++h1)
00044     cout << h1()->filename << endl;
00045 
00046   cout << "***" << endl;
00047 
00048   string file1="vrmlconvert.cpp";
00049   cout << "Removing file " << file1 << endl;
00050 
00051   h1.remove(file1); 
00052   cout << "Printing the hash container." << endl;
00053   for (h1.reset(); !h1; ++h1)
00054     cout << h1()->filename << endl;
00055 
00056 }
00057 

Generated on Fri Mar 4 00:49:27 2011 for Chelton Evans Source by  doxygen 1.5.8