CScheduler::~CScheduler(){ SaveToFile(); RemoveAll(); }
// Refresh the projects list. bool WorkspaceInfo::Refresh(void) { // If the internal project integrity is good, then no refresh is needed. if (CheckIntegrity()) return true; // Delete everything. RemoveAll(); // First, get a pointer to the dispatch for the Projects collection CComPtr<IDispatch> pDispProjects; VERIFY_OK(m_pApplication->get_Projects(&pDispProjects)); CComQIPtr<IProjects, &IID_IProjects> pProjects(pDispProjects); // Get the number of projects in the collection long projectCount; VERIFY_OK(pProjects->get_Count(&projectCount)); // Iterate all the projects. for (long i = 1; i < projectCount + 1; i++) { CComVariant Vari = i; // Get the next project CComPtr<IGenericProject> pGenProject; VERIFY_OK(pProjects->Item(Vari, &pGenProject)); CComQIPtr<IGenericProject, &IID_IGenericProject> pProject(pGenProject); // Get the project name. CComBSTR bszStr; VERIFY_OK(pProject->get_FullName(&bszStr)); CString projectName = bszStr; Add(projectName); } // Rename a misnamed add-on file. CString oldFilename = m_workspaceLocation + "ExtraFiles.PFO"; CString wuFilename = GetExtraFilename(); rename(oldFilename, wuFilename); // Is there an add-on file? CStdioFile file; if (file.Open(wuFilename, CFile::modeRead) == TRUE) { CString line; // Count the number of extra projects. while (1) { // Read in a project name. if (!file.ReadString(line)) break; // Check the integrity. Add(line); } // Close the file. file.Close(); } // Build the file array. m_fileList.Sort(); // Rebuilt stuff. return false; }
GrFmtFactoriesList::GrFmtFactoriesList() { m_factories = 0; RemoveAll(); }
AspectHub::~AspectHub() { RemoveAll(); Clear(_Lock); }
CBCGPAppointmentDSMap::~CBCGPAppointmentDSMap () { RemoveAll (); }
CXTPTabManagerNavigateButtons::~CXTPTabManagerNavigateButtons() { RemoveAll(); }
CUIntArray::~CUIntArray() /***********************/ { RemoveAll(); FreeExtra(); }
CObList::~CObList() { RemoveAll(); ASSERT(m_nCount == 0); }
CInfoList::~CInfoList(void) { RemoveAll(m_current_channel); }
void SubRectAllocator::UpdateTarget(const CSize& s, const CRect& r) { if(vs != s || vr != r) RemoveAll(); vs = s; vr = r; }
HRESULT IDSMPropertyBagImpl::DelAllProperties() { RemoveAll(); return S_OK; }
CMapWordToOb::~CMapWordToOb() { RemoveAll(); ASSERT(m_nCount == 0); }
HEventList::~HEventList() { RemoveAll(); delete fType; }
cAnimationManager::~cAnimationManager() { RemoveAll(); }
CConnections::~CConnections() { RemoveAll(); }
void GStringList::DeSerialize(const char *pzDelimiter, const char *pzSource, int nItemCount/* = -1*/) { RemoveAll(); DeSerializeAppend(pzDelimiter, pzSource, nItemCount); }
CFX_BaseSegmentedArray::~CFX_BaseSegmentedArray() { RemoveAll(); }
RedBlackTree<T>::~RedBlackTree() { RemoveAll(root); }
CTeamManager::~CTeamManager(void) { RemoveAll(); }
void RedBlackTree<T>::RemoveAll() { RemoveAll(root); }
StackHub::~StackHub() { RemoveAll(); Clear(_Lock); }
/** 将glossary.dat文件中的概念信息读入到数据库中 */ int GlossaryDao::ReadGlossaryToDB(const std::string str_path) { std::ifstream ifs_glossary(str_path.c_str()); //打开词典文件 std::string str_line; RemoveAll(); while(getline(ifs_glossary,str_line)) //逐行读取词典文件 { std::istringstream iss(str_line); std::string str_word,str_pos,str_sememe; iss>>str_word>>str_pos>>str_sememe; //由空白把一行分割成:词、词性、义原集合 std::string str_set; if(str_sememe[0]=='{') //该行是虚词,因为虚词的描述只有“{句法义原}”或“{关系义原}” { str_set=str_sememe; } else { std::string str1,str2,str3,str4;//分别是 基本义原描述式\n其他义原描述式\n关系义原描述式\n关系符号义原描述式 std::string::size_type pos1,pos2; pos1=0; bool flag=true; while(flag) { pos2=str_sememe.find(",",pos1); std::string str_sem; if(std::string::npos==pos2) //已是最后一个义原 { flag=false; str_sem=str_sememe.substr(pos1); //提取最后一个义原 } else { str_sem=str_sememe.substr(pos1,pos2-pos1); //提取下一个义原 }//sem是pos1之后的第一个逗号之前的义原 pos1=pos2+1; if(str_sem.find("=")!=std::string::npos) //关系义原,加入str3 { str3+=str_sem+","; } else { char c=str_sem[0]; //义原以大/小写英文字母开始,或者是具体词--单独在小括号里,属于其他义原,加入str2。40是"("的ASCII值 if((c>64&&c<91) || (c>96&&c<123) || (c==40)) { str2+=str_sem+","; } else //关系符号义原,加入str4 { str4+=str_sem+","; } } } //把str2中的第一条取出来,赋给str1 std::string::size_type pos3=str2.find(","); if(pos3!=std::string::npos) { str1=str2.substr(0,pos3); str2.erase(0,pos3+1); } if(str2!="") { str2.erase(str2.length()-1,1); } if(str3!="") { str3.erase(str3.length()-1,1); } if(str4!="") { str4.erase(str4.length()-1,1); } str_set=str1+"\n"+str2+"\n"+str3+"\n"+str4; } Insert(str_word,str_pos,str_set); } return 0; }
PropertyList::~PropertyList() { RemoveAll(); }
MTabCtrl::~MTabCtrl(void) { RemoveAll(); }
csMeshFactoryList::~csMeshFactoryList () { RemoveAll (); }
void PhoneBook::Cleanup(){ RemoveAll(); }
STDMETHODIMP CBQueue::InitNew(void) { return RemoveAll(); }
CXTPFlowGraphNodeGroup::~CXTPFlowGraphNodeGroup() { RemoveAll(); }
GrFmtFactoriesList::~GrFmtFactoriesList() { RemoveAll(); }
void CMediaFormats::UpdateData(bool fSave) { if(fSave) { AfxGetMyApp()->WriteProfileString(_T("FileFormats"), NULL, NULL); AfxGetMyApp()->WriteProfileInt(_T("FileFormats"), _T("RtspHandler"), m_iRtspHandler); AfxGetMyApp()->WriteProfileInt(_T("FileFormats"), _T("RtspFileExtFirst"), m_fRtspFileExtFirst); } else { RemoveAll(); #define ADDFMT(f) Add(CMediaFormatCategory##f) ADDFMT((_T("Windows Media file"), _T("wmv wmp wm asf"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Windows Media Audio file"), _T("wma"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("Video file"), _T("avi"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Audio file"), _T("wav"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("MPEG Media file"), _T("mpg mpeg mpe m1v m2v mpv2 mp2v mod"), _T("video"), IDI_VIDEO)); ADDFMT((_T("VCD MPEG Data file"), _T("dat"), _T("video"), IDI_VIDEO,-1)); ADDFMT((_T("Collegesoft Media file"), _T("csf"), _T("video"), IDI_VIDEO)); ADDFMT((_T("MPEG Transport-Stream file"), _T("ts tp tpr pva pss m2ts m2t mts evo m2p"), _T("video"), IDI_HD)); ADDFMT((_T("MPEG Audio file"), _T("mpa mp2 m1a m2a"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("VP8 Webm file"), _T("webm"), _T("video"), IDI_HD)); ADDFMT((_T("DVD file"), _T("vob ifo"), _T("video"), IDI_VIDEO)); ADDFMT((_T("DVD Audio file"), _T("ac3 dts"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("MP3 Format Sound"), _T("mp3"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("MIDI file"), _T("mid midi rmi"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("Indeo Video file"), _T("ivf"), _T("video"), IDI_VIDEO)); ADDFMT((_T("AIFF Format Sound"), _T("aif aifc aiff"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("Monkey's Audio APE File"), _T("ape"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("AU Format Sound"), _T("au snd"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("Ogg Media file"), _T("ogm ogv"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Ogg Vorbis Audio file"), _T("ogg"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("WavPack Audio file"), _T("wv wvc"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("CD Audio Track"), _T("cda"), _T("audio"), IDI_AUDIO_FILE, true, _T("Windows 2000/XP or better"))); ADDFMT((_T("FLIC file"), _T("fli flc flic"), _T("audio"), IDI_AUDIO_FILE)); ADDFMT((_T("DVD2AVI Project file"), _T("d2v"), _T("video"), IDI_VIDEO)); ADDFMT((_T("MPEG4 file"), _T("mp4 m4v hdmov"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Mobile Phone file"), _T("3gp 3gpp"), _T("video"), IDI_VIDEO)); ADDFMT((_T("MPEG4 Audio file"), _T("m4a m4b aac"), _T("video"), IDI_VIDEO, true)); ADDFMT((_T("Matroska Media file"), _T("mkv"), _T("video"), IDI_HD)); ADDFMT((_T("Matroska Audio file"), _T("mka"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("PSP/PMP Media file"), _T("pmp"), _T("video"), IDI_VIDEO, false)); ADDFMT((_T("Smacker/Bink Media file"), _T("smk bik"), _T("video"), IDI_VIDEO, false, _T("smackw32/binkw32.dll in dll path"))); ADDFMT((_T("ratdvd file"), _T("ratdvd"), _T("video"), IDI_VIDEO, false, _T("ratdvd media file"))); ADDFMT((_T("RoQ Media file"), _T("roq"), _T("video"), IDI_VIDEO, false)); ADDFMT((_T("Real Media file"), _T("rm rmvb ram rpm rmm"), _T("video"), IDI_VIDEO, false, _T("RealPlayer or Real Alternative") )); //RealMedia ADDFMT((_T("Real Audio file"), _T("ra"), _T("audio"), IDI_AUDIO_FILE, true, _T("RealPlayer or Real Alternative"))); // RealMedia ADDFMT((_T("Real Script file"), _T("rt rp smi smil"), _T("video"), IDI_VIDEO, false, _T("RealPlayer or Real Alternative"))); // RealMedia ADDFMT((_T("Dirac Video file"), _T("drc"), _T("video"), IDI_VIDEO, false)); ADDFMT((_T("DirectShow Media file"), _T("dsm dsv dsa dss"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Musepack file"), _T("mpc"), _T("video"), IDI_VIDEO, true)); ADDFMT((_T("FLAC Audio file"), _T("flac"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("ALAC Audio file"), _T("alac"), _T("audio"), IDI_AUDIO_FILE, true)); ADDFMT((_T("Flash Video file"), _T("flv iflv f4v hlv"), _T("video"), IDI_VIDEO)); ADDFMT((_T("Shockwave Flash file"), _T("swf"), _T("video"), IDI_VIDEO, -1, _T("ShockWave ActiveX control"), ShockWave)); ADDFMT((_T("Shockwave Audio file"), _T("swa"), _T("audio"), IDI_AUDIO_FILE, true, _T("ShockWave ActiveX control"), ShockWave)); ADDFMT((_T("Quicktime file"), _T("mov qt amr 3g2 3gp2"), _T("video"), IDI_VIDEO, false, _T("QuickTime or codec pack")));//QuickTime ADDFMT((_T("IVM file"), _T("ivm"), _T("video"), IDI_VIDEO, false)); ADDFMT((_T("Image file"), _T("jpeg jpg bmp gif pic dib tiff tif"), _T("image") ,0, -2)); //png not supported ADDFMT((_T("Playlist file"), _T("asx m3u pls wvx wax wmx mpcpl cue mpls bdmv"), _T("Application"), IDI_PLAYLIST)); ADDFMT((_T("Rar Playlist file"), _T("rar"), _T("Application"), 0, -1)); ADDFMT((_T("Subtitle file"), _T("srt idx sub ssa ass xss usf"), _T("text"), IDI_SUBTITLE_FILE )); ADDFMT((_T("Other"), _T("divx vp6 amv"), _T("video"), IDI_VIDEO)); #undef ADDFMT m_iRtspHandler = (engine_t)AfxGetMyApp()->GetProfileInt(_T("FileFormats"), _T("RtspHandler"), (int)DirectShow); //RealMedia m_fRtspFileExtFirst = !!AfxGetMyApp()->GetProfileInt(_T("FileFormats"), _T("RtspFileExtFirst"), 1); } //for(int i = 0; i < GetCount(); i++) // GetAt(i).UpdateData(fSave); }