Changeset 1673
- Timestamp:
- 2000-11-16T09:13:48+13:00 (23 years ago)
- Location:
- trunk/gsinstaller
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsinstaller/stringArray.cpp
r1498 r1673 26 26 } 27 27 28 void stringArray::permitDuplication(bool permit) 29 { this->permitDups = permit; 30 } 31 28 32 /** 29 33 * Add a new string to the array 30 34 */ 31 35 void stringArray::add(string member) 32 { if ( !this->includes(member))36 { if (this->permitDups || !this->includes(member)) 33 37 { this->array.push_back(member); 34 38 } -
trunk/gsinstaller/stringArray.h
r1539 r1673 19 19 { 20 20 private: 21 vector<string> array; 22 bool permitDups; 21 23 protected: 22 24 public: 23 vector<string> array;24 25 stringArray(); 25 26 stringArray(char *list, char *divider); 27 void permitDuplication(bool permit); 26 28 void add(char *member); 27 29 void add(string member); -
trunk/gsinstaller/unInstall.cpp
r1639 r1673 57 57 // open the log file 58 58 this->logfile.open(this->logfileName.c_str(), ios::in); 59 #ifndef __BORLANDC__ 59 60 if (this->logfile.is_open()) 61 #else 62 if (this->logfile.rdbuf()->is_open()) 63 #endif 60 64 { 61 65 // Get the commands into this object from the existing log file … … 225 229 226 230 bool installManager::recordLog() 227 { 228 // just return if there are no changes to record 231 { // just return if there are no changes to record 229 232 if (this->changed == false) 230 { 233 { return true; 231 234 } 232 235 … … 237 240 this->ensureLog(); 238 241 this->logfile.open(this->logfileName.c_str(), ios::out); 242 #ifndef __BORLANDC__ 239 243 if (!this->logfile.is_open()) 244 #else 245 if (!this->logfile.rdbuf()->is_open()) 246 #endif 240 247 { MessageBox(0, "Unable to open log file", "Test", MB_OK); 241 248 } -
trunk/gsinstaller/unInstall.h
r1639 r1673 32 32 stringArray parameters; 33 33 34 unInstallCommand() { }; 35 unInstallCommand(string commandname) { this->command = commandname; }; 34 unInstallCommand() 35 { this->parameters.permitDuplication(true); 36 } 37 unInstallCommand(string commandname) 38 { this->command = commandname; 39 this->parameters.permitDuplication(true); 40 } 36 41 unInstallCommand(string commandname, stringArray params) 37 { 42 { 38 43 this->command = commandname; 39 44 this->parameters = params; 45 this->parameters.permitDuplication(true); 40 46 }; 41 47 void addParameter(string parameter) { this->parameters.add(parameter); };
Note:
See TracChangeset
for help on using the changeset viewer.