本文整理汇总了C++中CAtlArray::RemoveAll方法的典型用法代码示例。如果您正苦于以下问题:C++ CAtlArray::RemoveAll方法的具体用法?C++ CAtlArray::RemoveAll怎么用?C++ CAtlArray::RemoveAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAtlArray
的用法示例。
在下文中一共展示了CAtlArray::RemoveAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CFontInfoJS& operator=(const CFontInfoJS& oSrc)
{
m_sName = oSrc.m_sName;
m_lIndexR = oSrc.m_lIndexR;
m_lIndexI = oSrc.m_lIndexI;
m_lIndexB = oSrc.m_lIndexB;
m_lIndexBI = oSrc.m_lIndexBI;
m_lFaceIndexR = oSrc.m_lFaceIndexR;
m_lFaceIndexI = oSrc.m_lFaceIndexI;
m_lFaceIndexB = oSrc.m_lFaceIndexB;
m_lFaceIndexBI = oSrc.m_lFaceIndexBI;
namesR.RemoveAll();
namesR.Copy(oSrc.namesR);
namesI.RemoveAll();
namesI.Copy(oSrc.namesI);
namesB.RemoveAll();
namesB.Copy(oSrc.namesB);
namesBI.RemoveAll();
namesBI.Copy(oSrc.namesBI);
return *this;
}
示例2: Read
bool CDSMSplitterFile::Read(__int64 len, CAtlArray<SyncPoint>& sps)
{
SyncPoint sp = {0, 0};
sps.RemoveAll();
while (len > 0) {
bool fSign = !!BitRead(1);
int iTimeStamp = (int)BitRead(3);
int iFilePos = (int)BitRead(3);
BitRead(1); // reserved
sp.rt += (REFERENCE_TIME)BitRead(iTimeStamp<<3) * (fSign ? -1 : 1);
sp.fp += BitRead(iFilePos<<3);
sps.Add(sp);
len -= 1 + iTimeStamp + iFilePos;
}
if (len != 0) {
sps.RemoveAll();
return false;
}
// TODO: sort sps
return true;
}
示例3: strTmp
int CBkSafeMsgBox2::ParseMsgLine(CString strMsg, CAtlArray<CString>& arrMsg)
{
int nRet = -1;
if (TRUE == strMsg.IsEmpty())
return nRet;
arrMsg.RemoveAll();
strMsg.Replace(_T("\\n"), _T("\n"));
int nIndex = -1;
strMsg += L"\n";
CString strTmp(L""), msg = strMsg;;
nIndex = msg.Find(L"\n");
while (-1 != nIndex)
{
strTmp = msg.Left(nIndex);
if (strTmp.GetLength())
arrMsg.Add(strTmp);
msg = msg.Mid(nIndex+1);
nIndex = msg.Find(L"\n");
}
return arrMsg.GetCount();
}
示例4: SetupMajorTypes
void CPPageExternalFilters::SetupMajorTypes(CAtlArray<GUID>& guids)
{
guids.RemoveAll();
guids.Add(MEDIATYPE_NULL);
guids.Add(MEDIATYPE_Video);
guids.Add(MEDIATYPE_Audio);
guids.Add(MEDIATYPE_Text);
guids.Add(MEDIATYPE_Midi);
guids.Add(MEDIATYPE_Stream);
guids.Add(MEDIATYPE_Interleaved);
guids.Add(MEDIATYPE_File);
guids.Add(MEDIATYPE_ScriptCommand);
guids.Add(MEDIATYPE_AUXLine21Data);
guids.Add(MEDIATYPE_VBI);
guids.Add(MEDIATYPE_Timecode);
guids.Add(MEDIATYPE_LMRT);
guids.Add(MEDIATYPE_URL_STREAM);
guids.Add(MEDIATYPE_MPEG1SystemStream);
guids.Add(MEDIATYPE_AnalogVideo);
guids.Add(MEDIATYPE_AnalogAudio);
guids.Add(MEDIATYPE_MPEG2_PACK);
guids.Add(MEDIATYPE_MPEG2_PES);
guids.Add(MEDIATYPE_MPEG2_SECTIONS);
guids.Add(MEDIATYPE_DVD_ENCRYPTED_PACK);
guids.Add(MEDIATYPE_DVD_NAVIGATION);
}
示例5: Shuffle
POSITION CPlaylist::Shuffle()
{
static INT_PTR idx = 0;
static INT_PTR count = 0;
static CAtlArray<plsort_t> a;
ASSERT(GetCount() > 2);
// insert or remove items in playlist, or index out of bounds then recalculate
if ((count != GetCount()) || (idx >= GetCount())) {
a.RemoveAll();
idx = 0;
a.SetCount(count = GetCount());
POSITION pos = GetHeadPosition();
for (INT_PTR i = 0; pos; i++, GetNext(pos)) {
a[i].pos = pos; // initialize position array
}
//Use Fisher-Yates shuffle algorithm
srand((unsigned)time(nullptr));
for (INT_PTR i = 0; i < (count - 1); i++) {
INT_PTR r = i + (rand() % (count - i));
POSITION temp = a[i].pos;
a[i].pos = a[r].pos;
a[r].pos = temp;
}
}
return a[idx++].pos;
}
示例6: GetPaths
void SlimItem::GetPaths(CAtlArray<CString>& itemPaths) const
{
itemPaths.RemoveAll();
for (size_t i = 0; i < m_itemPaths.GetCount(); i++)
{
itemPaths.Add(m_itemPaths[i]);
}
}
示例7: FreeServicePnPIDs
// Frees the service PnP IDs allocated by EumerateContactsServices
void FreeServicePnPIDs(CAtlArray<PWSTR>& ServicePnpIDs)
{
size_t cServicePnPIDs = ServicePnpIDs.GetCount();
for (size_t i=0; i<cServicePnPIDs; i++)
{
CoTaskMemFree(ServicePnpIDs[i]);
}
ServicePnpIDs.RemoveAll();
}
示例8: OnCommand
void CUIHandlerSystemSlim::OnCommand(UINT uNotifyCode, int nID, CWindow wndCtl)
{
BOOL bRet = FALSE;
if (nID >= DEF_SLIM_MENU_ID_BASE && nID <= DEF_SLIM_MENU_ID_BASE_END)
{
SlimItem& slimItem = m_slimData.GetItem(m_nCurrentIndex);
CAtlArray<CString> vPaths;
int index = nID - 1000;
slimItem.GetPaths(vPaths);
if (slimItem.Id() == 0) //壁纸 暂时先这样写
{
// ExpandEnvironmentStrings(L"%Systemroot%\\Web\\Wallpaper\\", temp, MAX_PATH * 2);
TCHAR szLocate[MAX_PATH] = { 0 };
_tcscpy_s(szLocate, MAX_PATH, vPaths[0]);
if (KGetWinVersion() != WINVERSION_XP)
{
PathRemoveFileSpec(szLocate);
}
PathRemoveFileSpec(szLocate);
vPaths.RemoveAll();
vPaths.Add(szLocate);
}
else if (slimItem.Id() == 1 || slimItem.Id() == 3 || slimItem.Id() == 2|| slimItem.Id() == 4)
{
CString strPath = vPaths[0];
TCHAR szLocate[MAX_PATH] = { 0 };
_tcscpy_s(szLocate, MAX_PATH, strPath);
PathRemoveFileSpec(szLocate);
vPaths.RemoveAll();
vPaths.Add(szLocate);
}
slimhelper::LocateFile(vPaths[index]);
}
SetMsgHandled(FALSE);
}
示例9: CutString
int CutString(const CString InStr, CAtlArray<CString>& OutStrings, LPCTSTR Separators)
{
int Pos = 0;
int StartPos = 0;
bool bQuotas = false;
OutStrings.RemoveAll();
while (Pos < InStr.GetLength())
{
TCHAR ch = InStr[Pos];
if (ch == _T('\"'))
{
if (InStr[Pos + 1] == _T('\"'))
{
Pos += 2;
continue;
}
else
{
bQuotas = !bQuotas;
}
}
if (!bQuotas && _tcsrchr(Separators, ch))
{
//нашли сепаратор
int WordLen = Pos - StartPos;
if (WordLen)
{
CString NewWord = InStr.Mid(StartPos, WordLen);
OutStrings.Add(NewWord);
}
StartPos = Pos + 1;
}
Pos++;
}
int WordLen = Pos - StartPos;
if (WordLen)
{
CString NewWord = InStr.Mid(StartPos, WordLen);
OutStrings.Add(NewWord);
}
else
{
OutStrings.Add(CString());
}
return (int)OutStrings.GetCount();
}
示例10: GetUnRescanList
HRESULT CReportFileDB::GetUnRescanList( CAtlArray<CReportFile>& rfArray )
{
HRESULT hr = S_OK;
CComPtr<Skylark::ISQLiteComResultSet3> piRtm;
CReportFile rfile;
if ( NULL == m_piSlDB )
{
hr = E_NOINTERFACE;
goto Exit0;
}
hr = m_piSlDB->ExecuteQuery( REPORT_FILE_LOAD_RESCANLIST, &piRtm );
if ( FAILED( hr ) )
{
CRunTimeLog::WriteLog(WINMOD_LLVL_DEBUG, L"[GetUnRescanList] query rfl.db failed %08x", hr );
goto Exit0;
}
rfArray.RemoveAll();
while( !piRtm->IsEof() )
{
rfile.m_strFilePath = piRtm->GetAsString( 0 );
rfile.m_nFileSize = piRtm->GetInt( 1 );
rfile.m_nReportState = piRtm->GetInt( 2 );
rfile.m_nTrack = piRtm->GetInt( 3 );
rfile.SetCreateTime( piRtm->GetInt64( 4 ) );
rfile.SetCommitTime( piRtm->GetInt64( 5 ) );
rfile.SetReportTime( piRtm->GetInt64( 6 ) );
rfile.m_nRescanState = piRtm->GetInt( 7 );
if ( FILE_TRACK_FILE & rfile.m_nTrack)
{
rfArray.Add( rfile );
}
piRtm->NextRow();
}
Exit0:
return hr;
}
示例11: ParsexmlCmdLine
int CCommon::ParsexmlCmdLine(LPCTSTR pszCmdLine, CAtlArray<CString>& arrStr)
{
int nRet = -1;
if (NULL == pszCmdLine)
return nRet;
arrStr.RemoveAll();
LPTSTR _pszCmdLine = StrDupW(pszCmdLine);
if (NULL == _pszCmdLine)
return nRet;
LPTSTR pValue = _pszCmdLine;
LPTSTR pos = NULL;
LPTSTR NewPos = NULL;
NewPos = StrStr(_pszCmdLine, TEXT("\","));
while(NULL != NewPos && _tcslen(NewPos) > 2)
{
pos = NewPos+2;
*NewPos = 0;
_pszCmdLine += 1;
arrStr.Add((_pszCmdLine));
_pszCmdLine = pos;
NewPos = StrStr(_pszCmdLine, TEXT("\","));
}
if (NULL != _pszCmdLine && _tcslen(_pszCmdLine) > 1)
{
_pszCmdLine += 1;
pos = StrRChr(_pszCmdLine, NULL, TEXT('\"'));
if (NULL != pos)
*pos = 0;
arrStr.Add(_pszCmdLine);
}
nRet = 0;
if (NULL != pValue)
{
LocalFree(pValue);
pValue = NULL;
}
return nRet;
}
示例12: SetupSubTypes
void CPPageExternalFilters::SetupSubTypes(CAtlArray<GUID>& guids)
{
guids.RemoveAll();
guids.Add(MEDIASUBTYPE_None);
guids.Add(MEDIASUBTYPE_CLPL);
guids.Add(MEDIASUBTYPE_YUYV);
guids.Add(MEDIASUBTYPE_IYUV);
guids.Add(MEDIASUBTYPE_YVU9);
guids.Add(MEDIASUBTYPE_Y411);
guids.Add(MEDIASUBTYPE_Y41P);
guids.Add(MEDIASUBTYPE_YUY2);
guids.Add(MEDIASUBTYPE_YVYU);
guids.Add(MEDIASUBTYPE_UYVY);
guids.Add(MEDIASUBTYPE_Y211);
guids.Add(MEDIASUBTYPE_CLJR);
guids.Add(MEDIASUBTYPE_IF09);
guids.Add(MEDIASUBTYPE_CPLA);
guids.Add(MEDIASUBTYPE_MJPG);
guids.Add(MEDIASUBTYPE_MJPA);
guids.Add(MEDIASUBTYPE_MJPB);
guids.Add(MEDIASUBTYPE_TVMJ);
guids.Add(MEDIASUBTYPE_WAKE);
guids.Add(MEDIASUBTYPE_CFCC);
guids.Add(MEDIASUBTYPE_IJPG);
guids.Add(MEDIASUBTYPE_Plum);
guids.Add(MEDIASUBTYPE_DVCS);
guids.Add(MEDIASUBTYPE_DVSD);
guids.Add(MEDIASUBTYPE_MDVF);
guids.Add(MEDIASUBTYPE_RGB1);
guids.Add(MEDIASUBTYPE_RGB4);
guids.Add(MEDIASUBTYPE_RGB8);
guids.Add(MEDIASUBTYPE_RGB565);
guids.Add(MEDIASUBTYPE_RGB555);
guids.Add(MEDIASUBTYPE_RGB24);
guids.Add(MEDIASUBTYPE_RGB32);
guids.Add(MEDIASUBTYPE_ARGB1555);
guids.Add(MEDIASUBTYPE_ARGB4444);
guids.Add(MEDIASUBTYPE_ARGB32);
guids.Add(MEDIASUBTYPE_A2R10G10B10);
guids.Add(MEDIASUBTYPE_A2B10G10R10);
guids.Add(MEDIASUBTYPE_AYUV);
guids.Add(MEDIASUBTYPE_AI44);
guids.Add(MEDIASUBTYPE_IA44);
guids.Add(MEDIASUBTYPE_RGB32_D3D_DX7_RT);
guids.Add(MEDIASUBTYPE_RGB16_D3D_DX7_RT);
guids.Add(MEDIASUBTYPE_ARGB32_D3D_DX7_RT);
guids.Add(MEDIASUBTYPE_ARGB4444_D3D_DX7_RT);
guids.Add(MEDIASUBTYPE_ARGB1555_D3D_DX7_RT);
guids.Add(MEDIASUBTYPE_RGB32_D3D_DX9_RT);
guids.Add(MEDIASUBTYPE_RGB16_D3D_DX9_RT);
guids.Add(MEDIASUBTYPE_ARGB32_D3D_DX9_RT);
guids.Add(MEDIASUBTYPE_ARGB4444_D3D_DX9_RT);
guids.Add(MEDIASUBTYPE_ARGB1555_D3D_DX9_RT);
guids.Add(MEDIASUBTYPE_YV12);
guids.Add(MEDIASUBTYPE_NV12);
guids.Add(MEDIASUBTYPE_IMC1);
guids.Add(MEDIASUBTYPE_IMC2);
guids.Add(MEDIASUBTYPE_IMC3);
guids.Add(MEDIASUBTYPE_IMC4);
guids.Add(MEDIASUBTYPE_S340);
guids.Add(MEDIASUBTYPE_S342);
guids.Add(MEDIASUBTYPE_Overlay);
guids.Add(MEDIASUBTYPE_MPEG1Packet);
guids.Add(MEDIASUBTYPE_MPEG1Payload);
guids.Add(MEDIASUBTYPE_MPEG1AudioPayload);
guids.Add(MEDIASUBTYPE_MPEG1System);
guids.Add(MEDIASUBTYPE_MPEG1VideoCD);
guids.Add(MEDIASUBTYPE_MPEG1Video);
guids.Add(MEDIASUBTYPE_MPEG1Audio);
guids.Add(MEDIASUBTYPE_Avi);
guids.Add(MEDIASUBTYPE_Asf);
guids.Add(MEDIASUBTYPE_QTMovie);
guids.Add(MEDIASUBTYPE_QTRpza);
guids.Add(MEDIASUBTYPE_QTSmc);
guids.Add(MEDIASUBTYPE_QTRle);
guids.Add(MEDIASUBTYPE_QTJpeg);
guids.Add(MEDIASUBTYPE_PCMAudio_Obsolete);
guids.Add(MEDIASUBTYPE_PCM);
guids.Add(MEDIASUBTYPE_WAVE);
guids.Add(MEDIASUBTYPE_AU);
guids.Add(MEDIASUBTYPE_AIFF);
guids.Add(MEDIASUBTYPE_dvsd);
guids.Add(MEDIASUBTYPE_dvhd);
guids.Add(MEDIASUBTYPE_dvsl);
guids.Add(MEDIASUBTYPE_dv25);
guids.Add(MEDIASUBTYPE_dv50);
guids.Add(MEDIASUBTYPE_dvh1);
guids.Add(MEDIASUBTYPE_Line21_BytePair);
guids.Add(MEDIASUBTYPE_Line21_GOPPacket);
guids.Add(MEDIASUBTYPE_Line21_VBIRawData);
guids.Add(MEDIASUBTYPE_TELETEXT);
guids.Add(MEDIASUBTYPE_DRM_Audio);
guids.Add(MEDIASUBTYPE_IEEE_FLOAT);
guids.Add(MEDIASUBTYPE_DOLBY_AC3_SPDIF);
guids.Add(MEDIASUBTYPE_RAW_SPORT);
guids.Add(MEDIASUBTYPE_SPDIF_TAG_241h);
guids.Add(MEDIASUBTYPE_DssVideo);
guids.Add(MEDIASUBTYPE_DssAudio);
guids.Add(MEDIASUBTYPE_VPVideo);
guids.Add(MEDIASUBTYPE_VPVBI);
//.........这里部分代码省略.........
示例13: Clear
void CBBrowserCaps::Clear(void)
{
s_bcDatas.RemoveAll();
s_bcDatasExt.RemoveAll();
}
示例14: NoTypeProperties
HRESULT NoTypeProperties( CAtlArray<std::pair<const CComBSTR, const CComVariant> >& props )
{
props.RemoveAll();
return S_OK;
}
示例15: GetSubFileNames
void GetSubFileNames(CString fn, CAtlArray<CString>& paths, CString load_ext_list, CAtlArray<SubFile>& ret)
{
XY_LOG_INFO(XY_LOG_VAR_2_STR(fn.GetString())<<XY_LOG_VAR_2_STR(paths.GetCount())<<XY_LOG_VAR_2_STR(load_ext_list.GetString()));
ret.RemoveAll();
fn.Replace('\\', '/');
bool fWeb = false;
{
//int i = fn.Find(_T("://"));
int i = fn.Find(_T("http://"));
if(i > 0) {fn = _T("http") + fn.Mid(i); fWeb = true;}
}
int l = fn.GetLength(), l2 = l;
l2 = fn.ReverseFind('.');
l = fn.ReverseFind('/') + 1;
if(l2 < l) l2 = l;
CString orgpath = fn.Left(l);
CString title = fn.Mid(l, l2-l);
CString filename = title + _T(".nooneexpectsthespanishinquisition");
ExtSupport ext_support;
if (!ext_support.init(load_ext_list))
{
XY_LOG_INFO(_T("unexpected error"));
return;
}
if(!fWeb)
{
WIN32_FIND_DATA wfd;
for(size_t k = 0; k < paths.GetCount(); k++)
{
CString path = paths[k];
path.Replace('\\', '/');
l = path.GetLength();
if(l > 0 && path[l-1] != '/') path += '/';
if(path.Find(':') == -1 && path.Find(_T("\\\\")) != 0) path = orgpath + path;
path.Replace(_T("/./"), _T("/"));
path.Replace('/', '\\');
CAtlList<CString> sl;
bool fEmpty = true;
HANDLE hFile = FindFirstFile(path + title + _T(".*"), &wfd);
if(hFile != INVALID_HANDLE_VALUE)
{
do
{
if(filename.CompareNoCase(wfd.cFileName) != 0)
{
fEmpty = false;
sl.AddTail(wfd.cFileName);
}
}
while(FindNextFile(hFile, &wfd));
FindClose(hFile);
}
if(fEmpty) continue;
POSITION pos = sl.GetHeadPosition();
while(pos)
{
const CString& fn = sl.GetNext(pos);
int l = fn.ReverseFind('.');
CString ext = fn.Mid(l+1).MakeLower();
int ext_order = ext_support.ext_support_order(ext);
if (ext_order>-1)
{
SubFile f;
f.full_file_name = path + fn;
int l2 = fn.Find('.');
if (l2==l)
{
f.extra_name = "";
}
else
{
f.extra_name = fn.Mid(l2+1, l-l2-1);
}
f.ext_order = ext_order;
f.path_order = k;
ret.Add(f);
}
}
}
}
else if(l > 7)
{
//.........这里部分代码省略.........