当前位置: 首页>>代码示例>>C++>>正文


C++ OBJLIST::remove方法代码示例

本文整理汇总了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;
}
开发者ID:Robyer,项目名称:miranda-plugins,代码行数:30,代码来源:voiceservice.cpp

示例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);
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:31,代码来源:download.cpp

示例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);
}
开发者ID:raoergsls,项目名称:miranda,代码行数:27,代码来源:miranda.cpp

示例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;
		}
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:8,代码来源:clistmod.cpp

示例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);
	}
}
开发者ID:Robyer,项目名称:miranda-plugins,代码行数:8,代码来源:voiceservice.cpp

示例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);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:9,代码来源:imagecache.cpp

示例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));
		}
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:10,代码来源:modern_xptheme.cpp

示例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);
	}
}
开发者ID:fatty-,项目名称:miranda-ng,代码行数:10,代码来源:poll.cpp

示例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));
	}
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:10,代码来源:modern_xptheme.cpp

示例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;
}	}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:14,代码来源:tools.cpp

示例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();
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:17,代码来源:modern_xptheme.cpp

示例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);
}
开发者ID:Robyer,项目名称:miranda-plugins,代码行数:18,代码来源:voiceservice.cpp

示例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);
		}
	}
}
开发者ID:fatty-,项目名称:miranda-ng,代码行数:40,代码来源:poll.cpp

示例14: prepareLogger

MIR_CORE_DLL(void) mir_closeLog(HANDLE hLogger)
{
	Logger *p = prepareLogger(hLogger);
	if (p != NULL)
		arLoggers.remove(p);
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:6,代码来源:logger.cpp

示例15: protoUninit

static int protoUninit(PROTO_INTERFACE *proto)
{
	g_Instances.remove(static_cast<TwitterProto*>(proto));
	return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:5,代码来源:main.cpp


注:本文中的OBJLIST::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。