Changeset 294 for AE/Installer/trunk/source/methods.h
- Timestamp:
- Apr 6, 2009, 5:13:01 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Installer/trunk/source/methods.h
r293 r294 8 8 bool isInstalled; //replace with function 9 9 string name; 10 string modString; 10 string modStringName; 11 int modStringVersion; 11 12 bool hasOnis; 12 13 bool hasDeltas; 13 14 bool hasBSL; 14 15 bool hasDats; 15 boolcategory;16 string category; 16 17 string creator; 17 18 bool isEngine; 18 19 string readme; 19 20 bool globalNeeded; 21 ModPackage(); 22 void doOutput() { 23 cout << "Mod: " << name; cout << "\n"; //remove this when done 24 cout << " String: " << modStringName << " v." << modStringVersion << "\n"; 25 cout << " Category: " << category << "\n"; 26 cout << " Creator: " << creator << "\n"; 27 cout << " HasOnis: " << hasOnis << "\n"; 28 cout << " HasBSL: " << hasBSL << "\n"; 29 cout << " HasDeltas: " << hasDeltas << "\n"; 30 cout << " HasDats: " << hasDats << "\n"; 31 cout << " IsEngine: " << isEngine << "\n"; 32 cout << " GlobalNeeded: " << globalNeeded << "\n"; 33 cout << " Readme: " << readme << "\n"; 34 cout << "\n"; 35 } 36 20 37 }; 38 //Initialization 39 ModPackage::ModPackage() { 40 isInstalled = 0; //replace with function 41 name = ""; 42 modStringName = ""; 43 modStringVersion = 0; 44 hasOnis = 0; 45 hasDeltas = 0; 46 hasBSL = 0; 47 hasDats = 0; 48 category = ""; 49 creator = ""; 50 isEngine = 0; 51 readme = ""; 52 globalNeeded = 1; 53 // void doOutput() const 54 // { }; 55 } 21 56 22 57 int mainMenu(); … … 32 67 33 68 void Tokenize(const string& str, 34 35 69 vector<string>& tokens, 70 const string& delimiters = " ") 36 71 { 37 38 39 40 72 // Skip delimiters at beginning. 73 string::size_type lastPos = str.find_first_not_of(delimiters, 0); 74 // Find first "non-delimiter". 75 string::size_type pos = str.find_first_of(delimiters, lastPos); 41 76 42 43 44 45 46 47 48 49 50 77 while (string::npos != pos || string::npos != lastPos) 78 { 79 // Found a token, add it to the vector. 80 tokens.push_back(str.substr(lastPos, pos - lastPos)); 81 // Skip delimiters. Note the "not_of" 82 lastPos = str.find_first_not_of(delimiters, pos); 83 // Find next "non-delimiter" 84 pos = str.find_first_of(delimiters, lastPos); 85 } 51 86 }
Note:
See TracChangeset
for help on using the changeset viewer.