BOOL Monitor::SetParameterList(CStringList &lstParameter) { CStringList::iterator it; if(!m_ParamList.empty()) { /* for(it=m_ParamList.begin();it!=m_ParamList.end();it++) { free((*it)); } */ m_ParamList.clear(); } if(lstParameter.empty()) return TRUE; for(it=lstParameter.begin();it!=lstParameter.end();it++) { m_ParamList.push_back((*it)); } lstParameter.clear(); return TRUE; }
void getSubDirs() { // If foldersconfig.txt is turned off, use the old style. if ( noFoldersConfig ) { subDirs.clear(); getSubDirs_os( dataDir.text() ); if ( shareFolder.length() > 1 ) getSubDirs_os( shareFolder.text() ); } else { subDirs.clear(); subDirs.add(dataDir); for (int i = 0; i < folderConfig.count(); i++) { if (folderConfig[i][0] == '#') continue; CBuffer fmask, fname; // Get rid of all \t and replace with ' '. // Also, trim. folderConfig[i].replaceAll( "\t", " " ); // Read past the identifier. folderConfig[i].setRead(folderConfig[i].find(' ')); // Read the mask CBuffer temp = folderConfig[i].readString( "" ); temp.trim(); // If it starts with ./, use . instead of world/ as the search dir. if ( temp.find( "./" ) == 0 ) fmask = CBuffer() << programDir << temp; else fmask = CBuffer() << dataDir << temp; // Pull off the file mask and only save the directory. fname = CBuffer() << fmask.readChars(fmask.findl(fSep[0])) << fSep; if (subDirs.find(fname) == -1) subDirs.add(fname); } } }
/*! \fn Util::FreeStringList(CStringList &lst) */ void Util::FreeStringList(CStringList &lst) { /* CStringList::iterator it; for(it=lst.begin();it!=lst.end();it++) free(*it);*/ lst.clear(); /// @todo implement me }