本文整理汇总了C++中OBJLIST::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ OBJLIST::remove方法的具体用法?C++ OBJLIST::remove怎么用?C++ OBJLIST::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OBJLIST
的用法示例。
在下文中一共展示了OBJLIST::remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VoiceUnregister
static INT_PTR VoiceUnregister(WPARAM wParam, LPARAM lParam)
{
char *moduleName = (char *) wParam;
if (moduleName == NULL || moduleName[0] == 0)
return -1;
VoiceProvider *module = FindModule(moduleName);
if (module == NULL)
return -2;
for(int i = calls.getCount() - 1; i >= 0; --i)
{
VoiceCall *call = &calls[i];
if (call->module == module)
{
call->Drop();
call->SetState(VOICE_STATE_ENDED);
calls.remove(i);
}
}
modules.remove(module);
if (hwnd_frame != NULL)
PostMessage(hwnd_frame, WMU_REFRESH, 0, 0);
return 0;
}
示例2: SmileyDownloadThread
void __cdecl SmileyDownloadThread(void*)
{
bool needext = false;
HANDLE hHttpDwnl = NULL;
WaitForSingleObject(g_hDlMutex, 3000);
while (!Miranda_Terminated() && dlQueue.getCount()) {
ReleaseMutex(g_hDlMutex);
if (_taccess(dlQueue[0].fname.c_str(), 0) != 0) {
InternetDownloadFile(T2A_SM(dlQueue[0].url.c_str()), T2A_SM(dlQueue[0].fname.c_str()), hHttpDwnl);
WaitForSingleObject(g_hDlMutex, 3000);
CMString fname(dlQueue[0].fname);
if (dlQueue[0].needext) { fname += GetImageExt(fname); needext = true; }
_trename(dlQueue[0].fname.c_str(), fname.c_str());
}
else WaitForSingleObject(g_hDlMutex, 3000);
dlQueue.remove(0);
}
dlQueue.destroy();
if (hHttpDwnl) Netlib_CloseHandle(hHttpDwnl);
threadRunning = false;
ReleaseMutex(g_hDlMutex);
if (!Miranda_Terminated()) {
if (needext)
CallServiceSync(MS_SMILEYADD_RELOAD, 0, 0);
else
NotifyEventHooks(hEvent1, 0, 0);
}
}
示例3: APCWndProc
LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_NULL:
while (APCCallQueue.getCount())
{
APCCall tmpCall;
WaitForSingleObject(hApcMutex, INFINITE);
if (APCCallQueue.getCount())
{
tmpCall = APCCallQueue[0];
APCCallQueue.remove(0);
}
ReleaseMutex(hApcMutex);
if (tmpCall.func) tmpCall.func(tmpCall.param);
}
SleepEx(0, TRUE); // process APCs created by plugins that do not use core service
break;
case WM_TIMECHANGE:
RecalculateTime();
break;
}
return DefWindowProc(hwnd,msg,wParam,lParam);
}
示例4: RemoveProtoIconIndex
static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
{
for (int i = 0; i < protoIconIndex.getCount(); i++)
if (mir_strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) {
protoIconIndex.remove(i);
break;
}
}
示例5: RemoveVoiceCall
static void RemoveVoiceCall(const char *szModule, const char *id)
{
for(int i = calls.getCount() - 1; i >= 0; --i)
{
if (IsCall(&calls[i], szModule, id))
calls.remove(i);
}
}
示例6: ProcessTimerTick
void ImageBase::ProcessTimerTick(time_t ts)
{
WaitForSingleObject(g_hMutexIm, 3000);
if (m_lRefCount == 0 && m_timestamp < ts)
if (!g_imagecache.remove(this))
delete this;
ReleaseMutex(g_hMutexIm);
}
示例7: xpt_FreeThemeForWindow
void xpt_FreeThemeForWindow(HWND hwnd)
{
mir_cslock lck(xptCS);
auto T = xptObjectList.rev_iter();
for (auto &xptObject : T)
if (xptObject->hOwnerWindow == hwnd) {
_sttXptCloseThemeData(xptObject);
xptObjectList.remove(T.indexOf(&xptObject));
}
}
示例8: QueueRemove
static void QueueRemove(MCONTACT hContact)
{
mir_cslock lck(cs);
for (int i = queue.getCount() - 1; i >= 0; i--) {
QueueItem& item = queue[i];
if (item.hContact == hContact)
queue.remove(i);
}
}
示例9: xpt_FreeThemeHandle
void xpt_FreeThemeHandle(XPTHANDLE xptHandle)
{
mir_cslock lck(xptCS);
if (xpt_IsValidHandle(xptHandle)) {
XPTObject* xptObject = (XPTObject*)xptHandle;
_sttXptCloseThemeData(xptObject);
mir_free(xptHandle);
xptObjectList.remove(xptObjectList.indexOf(xptObject));
}
}
示例10: KillChatTimer
void CIrcProto::KillChatTimer(UINT_PTR &nIDEvent)
{
if ( nIDEvent ) {
EnterCriticalSection( &timers_cs );
TimerPair temp( this, nIDEvent );
int idx = timers.getIndex( &temp );
if ( idx != -1 )
timers.remove( idx );
LeaveCriticalSection( &timers_cs );
KillTimer(NULL, nIDEvent);
nIDEvent = NULL;
} }
示例11: xpt_FreeThemeForWindow
void xpt_FreeThemeForWindow(HWND hwnd)
{
xptlock();
{
for (int i=0; i < xptObjectList.getCount(); )
{
XPTObject& xptObject = xptObjectList[i];
if (xptObject.hOwnerWindow == hwnd)
{
_sttXptCloseThemeData(&xptObject);
xptObjectList.remove(i);
}
else i++;
}
}
xptunlock();
}
示例12: ClearOldVoiceCalls
static VOID CALLBACK ClearOldVoiceCalls(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
DWORD now = GetTickCount();
BOOL refresh = FALSE;
for(int i = calls.getCount() - 1; i >= 0; --i)
{
VoiceCall *call = &calls[i];
if (call->state == VOICE_STATE_ENDED && call->end_time + TIME_TO_SHOW_ENDED_CALL < now)
{
calls.remove(i);
refresh = TRUE;
}
}
if (refresh && hwnd_frame != NULL)
PostMessage(hwnd_frame, WMU_REFRESH, 0, 0);
}
示例13: RequestThread
static void RequestThread(void *vParam)
{
while (!g_shutDown) {
EnterCriticalSection(&cs);
if (queue.getCount() == 0) {
// No items, so suspend thread
LeaveCriticalSection(&cs);
mir_sleep(POOL_DELAY);
continue;
}
// Take a look at first item
QueueItem& qi = queue[queue.getCount() - 1];
if (qi.check_time > GetTickCount()) {
// Not time to request yet, wait...
LeaveCriticalSection(&cs);
mir_sleep(POOL_DELAY);
continue;
}
// Will request this item
MCONTACT hContact = qi.hContact;
queue.remove(queue.getCount() - 1);
QueueRemove(hContact);
LeaveCriticalSection(&cs);
if (FetchAvatarFor(hContact) == GAIR_WAITFOR) {
// Mark to not request this contact avatar for more 30 min
{
mir_cslock lock(cs);
QueueRemove(hContact);
QueueAdd(hContact, REQUEST_WAITFOR_WAIT_TIME);
}
// Wait a little until requesting again
mir_sleep(REQUEST_DELAY);
}
}
}
示例14: prepareLogger
MIR_CORE_DLL(void) mir_closeLog(HANDLE hLogger)
{
Logger *p = prepareLogger(hLogger);
if (p != NULL)
arLoggers.remove(p);
}
示例15: protoUninit
static int protoUninit(PROTO_INTERFACE *proto)
{
g_Instances.remove(static_cast<TwitterProto*>(proto));
return 0;
}