Files Classes Functions Hierarchy
00001 #include <iostream> 00002 using namespace std; 00003 00004 #include <compilationfile.h> 00005 #include <compilationfiletest.h> 00006 00007 string compilationfiletest::doc[] = 00008 { 00009 "", 00010 "Print a compilationfile.", 00011 "Explore find with text string.", 00012 "Constructing a compilationfile." 00013 }; 00014 00015 00016 void compilationfiletest::test01() 00017 { 00018 string s1="../vrml/vrmlshapeparse.h"; 00019 00020 compilationfile c1(s1); 00021 00022 c1.print(); 00023 } 00024 00025 00026 void compilationfiletest::test02() 00027 { 00028 string s1="../vrml/vrmlshapeparse.h"; 00029 string::size_type pos = s1.rfind("."); 00030 cout << s1.substr(pos) << endl; 00031 00032 string::size_type pos2 = s1.rfind("/"); 00033 string s2 = s1.substr(pos2+1); 00034 cout << s2 << endl; 00035 00036 cout << s1.substr(0,pos2+1) << endl; 00037 00038 string::size_type pos3 = s2.rfind("."); 00039 cout << s2.substr(0,pos3) << endl; 00040 } 00041 00042 void compilationfiletest::test03() 00043 { 00044 string s1="../vrml/vrmlshapeparse.h"; 00045 00046 compilationfile cf(s1); 00047 cf.print(); 00048 } 00049
1.5.8