您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ArrayList_GetItem函数代码示例

51自学网 2021-06-01 19:47:33
  C++
这篇教程C++ ArrayList_GetItem函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ArrayList_GetItem函数的典型用法代码示例。如果您正苦于以下问题:C++ ArrayList_GetItem函数的具体用法?C++ ArrayList_GetItem怎么用?C++ ArrayList_GetItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ArrayList_GetItem函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: freerdp_channels_find_by_instance

static rdpChannels* freerdp_channels_find_by_instance(freerdp* instance){	int index;	BOOL found = FALSE;	rdpChannels* channels = NULL;	ArrayList_Lock(g_ChannelsList);	index = 0;	channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, index++);	while (channels)	{		if (channels->instance == instance)		{			found = TRUE;			break;		}		channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, index++);	}	ArrayList_Unlock(g_ChannelsList);	return (found) ? channels : NULL;}
开发者ID:KimDongChun,项目名称:FreeRDP,代码行数:26,


示例2: assert

IWTSVirtualChannel *dvcman_find_channel_by_id(IWTSVirtualChannelManager *pChannelMgr, UINT32 ChannelId){	int index;	BOOL found = FALSE;	DVCMAN_CHANNEL *channel;	DVCMAN *dvcman = (DVCMAN *) pChannelMgr;	assert(dvcman);	ArrayList_Lock(dvcman->channels);	index = 0;	channel = (DVCMAN_CHANNEL *) ArrayList_GetItem(dvcman->channels, index++);	while (channel)	{		if (channel->channel_id == ChannelId)		{			found = TRUE;			break;		}		channel = (DVCMAN_CHANNEL *) ArrayList_GetItem(dvcman->channels, index++);	}	ArrayList_Unlock(dvcman->channels);	return (found) ? ((IWTSVirtualChannel *) channel) : NULL;}
开发者ID:Auto-Droid,项目名称:FreeRDP,代码行数:25,


示例3: SortedLimitedList_AddItem

int SortedLimitedList_AddItem (SortedLimitedList* self, void* value){	int pos = ArrayList_Count(&self->base);	while (pos > 0 && self->comparator.compareTo(&self->comparator, ArrayList_GetItem(&self->base, pos-1), value) >= 0) {		if (pos < self->max) {			if (pos==self->max-1) {				if (ArrayList_Count(&self->base) == self->max) {					if (self->deletefn) {						self->deletefn(ArrayList_GetItem(&self->base, pos));					}				}			}			SortedLimitedList_SetItem(self, pos, ArrayList_GetItem(&self->base, pos-1));		}		pos --;	}		if (pos < self->max) {		if (pos==self->max-1) {			if (ArrayList_Count(&self->base) == self->max) {				if (self->deletefn) {					self->deletefn(ArrayList_GetItem(&self->base, pos));				}			}		}	        SortedLimitedList_SetItem(self, pos, value);	} else {		if (self->deletefn) {			self->deletefn(value);		}		pos = -1;	}		return pos;}
开发者ID:BangL,项目名称:android_external_Focal,代码行数:35,


示例4: main

int main (int argc, char* argv[]){	ArrayList* al = ArrayList_new0 (FilterPoint_delete);	Random* rnd = Random_new0 ();	int n;	for (n = 0 ; n < 10 ; ++n) {		FilterPoint* p = FilterPoint_new0 ();			p->x = Random_NextDouble(rnd) * 400.0;		p->y = Random_NextDouble(rnd) * 400.0;			ArrayList_AddItem(al, p);	}	int i;	for(i=0; i<ArrayList_Count(al); i++) {		FilterPoint* p = ArrayList_GetItem(al, i);		WriteLine ("%f %f # GNUPLOT1", p->x, p->y);	}	AreaFilter* conv = AreaFilter_new0 ();	ArrayList* hull = AreaFilter_CreateConvexHull(conv, al);		WriteLine ("/nhull: %d elements", ArrayList_Count(hull));	int j;	for(j=0; j<ArrayList_Count(hull); j++) {		FilterPoint* p = ArrayList_GetItem(hull, j);		WriteLine ("%f %f # GNUPLOT2", p->x, p->y);	}		WriteLine ("/npolygon area: %f", AreaFilter_PolygonArea(conv, hull));	ArrayList_delete(al);	return 0;}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:34,


示例5: MatchKeys_FilterJoins

ArrayList* MatchKeys_FilterJoins (ArrayList* matches){	HashTable* ht = HashTable_new0 (NULL, NULL);		// Count the references to each keypoint	int i;	for(i=0; i<ArrayList_Count(matches); i++) {		Match* m = (Match*) ArrayList_GetItem(matches, i);		int lI = (HashTable_GetItem(ht, m->kp1) == NULL) ? 0 : (int) HashTable_GetItem(ht, m->kp1);		HashTable_SetItem(ht, m->kp1, (void*)(lI + 1));		int rI = (HashTable_GetItem(ht, m->kp2) == NULL) ? 0 : (int) HashTable_GetItem(ht, m->kp2);		HashTable_SetItem(ht, m->kp2, (void*)(rI + 1));	}	ArrayList* survivors = ArrayList_new0(NULL);	int removed = 0;	int j;	for(j=0; j<ArrayList_Count(matches); j++) {		Match* m = (Match*) ArrayList_GetItem(matches, j);		//WriteLine ("match: %d, %d", (int) HashTable_GetItem(ht, m->kp1), (int) HashTable_GetItem(ht, m->kp2));				if (((int) HashTable_GetItem(ht, m->kp1)) <= 1 && ((int) HashTable_GetItem(ht, m->kp2)) <= 1)			ArrayList_AddItem(survivors, m);		else			removed += 1;	}		HashTable_delete(ht);	return (survivors);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:31,


示例6: freerdp_channels_find_by_open_handle

static rdpChannels* freerdp_channels_find_by_open_handle(int open_handle, int* pindex){	int i, j;	BOOL found = FALSE;	rdpChannels* channels = NULL;	ArrayList_Lock(g_ChannelsList);	i = j = 0;	channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, i++);	while (channels)	{		for (j = 0; j < channels->channelDataCount; j++)		{			if (channels->channelDataList[j].open_handle == open_handle)			{				*pindex = j;				found = TRUE;				break;			}		}		if (found)			break;		channels = (rdpChannels*) ArrayList_GetItem(g_ChannelsList, i++);	}	ArrayList_Unlock(g_ChannelsList);	return (found) ? channels : NULL;}
开发者ID:KimDongChun,项目名称:FreeRDP,代码行数:33,


示例7: svc_plugin_find_by_open_handle

static rdpSvcPlugin* svc_plugin_find_by_open_handle(UINT32 open_handle){	int index;	BOOL found = FALSE;	rdpSvcPlugin* plugin;	ArrayList_Lock(g_AddinList);	index = 0;	plugin = (rdpSvcPlugin*) ArrayList_GetItem(g_AddinList, index++);	while (plugin)	{		if (plugin->open_handle == open_handle)		{			found = TRUE;			break;		}		plugin = (rdpSvcPlugin*) ArrayList_GetItem(g_AddinList, index++);	}	ArrayList_Unlock(g_AddinList);	return (found) ? plugin : NULL;}
开发者ID:akboom,项目名称:FreeRDP,代码行数:26,


示例8: FreeRDP_WTSCloseServer

VOID WINAPI FreeRDP_WTSCloseServer(HANDLE hServer){	int index;	int count;	rdpPeerChannel* channel;	WTSVirtualChannelManager* vcm;	vcm = (WTSVirtualChannelManager*) hServer;	if (vcm)	{		HashTable_Remove(g_ServerHandles, (void*)(UINT_PTR) vcm->SessionId);		ArrayList_Lock(vcm->dynamicVirtualChannels);		count = ArrayList_Count(vcm->dynamicVirtualChannels);		for (index = 0; index < count; index++)		{			channel = (rdpPeerChannel*) ArrayList_GetItem(vcm->dynamicVirtualChannels,			          index);			WTSVirtualChannelClose(channel);		}		ArrayList_Unlock(vcm->dynamicVirtualChannels);		ArrayList_Free(vcm->dynamicVirtualChannels);		if (vcm->drdynvc_channel)		{			WTSVirtualChannelClose(vcm->drdynvc_channel);			vcm->drdynvc_channel = NULL;		}		MessageQueue_Free(vcm->queue);		free(vcm);	}}
开发者ID:dcatonR1,项目名称:FreeRDP,代码行数:34,


示例9: _Publish

static void _Publish(rdpShadowMultiClientEvent* event){	wArrayList* subscribers;	struct rdp_shadow_multiclient_subscriber* subscriber = NULL;	int i;	subscribers = event->subscribers;	assert(event->consuming == 0);	/* Count subscribing clients */	ArrayList_Lock(subscribers);	for (i = 0; i < ArrayList_Count(subscribers); i++)	{		subscriber = (struct rdp_shadow_multiclient_subscriber *)ArrayList_GetItem(subscribers, i);		/* Set flag to subscriber: I acknowledge and please handle */		subscriber->pleaseHandle = TRUE;		event->consuming++;	}	ArrayList_Unlock(subscribers);	if (event->consuming > 0)	{		event->eventid = (event->eventid & 0xff) + 1;		WLog_VRB(TAG, "Server published event %d. %d clients./n", event->eventid, event->consuming);		ResetEvent(event->doneEvent);		SetEvent(event->event);	}	return;}
开发者ID:BUGgs,项目名称:FreeRDP,代码行数:31,


示例10: AreaFilter_PolygonArea

// Measure the absolute area of a non self-intersecting polygon.// Formula by Paul Bourke// (http://astronomy.swin.edu.au/~pbourke/geometry/polyarea/)//// The input points must be ordered (clock- or counter-clockwise). The// polygon is closed automatically between the first and the last point,// so there should not be two same points in the polygon point set.double AreaFilter_PolygonArea (AreaFilter* self, ArrayList* orderedPoints){	double A = 0.0;		int n;	for (n = 0 ; n < ArrayList_Count(orderedPoints) ; ++n) {		FilterPoint* p0 = (FilterPoint*) ArrayList_GetItem(orderedPoints,n);		FilterPoint* p1 = (FilterPoint*) ArrayList_GetItem(orderedPoints, (n + 1) % ArrayList_Count(orderedPoints));				A += p0->x * p1->y - p1->x * p0->y;	}	A *= 0.5;		return (abs (A));}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:23,


示例11: FindWindowClass

WNDCLASSEXA* FindWindowClass(LPCSTR lpClassName){	int index;	int count;	BOOL found = FALSE;	WNDCLASSEXA* lpwcx = NULL;	ArrayList_Lock(g_WindowClasses);	count = ArrayList_Count(g_WindowClasses);	for (index = 0; index < count; index++)	{		lpwcx = (WNDCLASSEXA*) ArrayList_GetItem(g_WindowClasses, index);		if (strcmp(lpClassName, lpwcx->lpszClassName) == 0)		{			found = TRUE;			break;		}	}	ArrayList_Unlock(g_WindowClasses);	return (found) ? lpwcx : NULL;}
开发者ID:99455125,项目名称:FreeRDP,代码行数:26,


示例12: wts_get_dvc_channel_by_id

static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm, UINT32 ChannelId){	int index;	int count;	BOOL found = FALSE;	rdpPeerChannel* channel = NULL;	ArrayList_Lock(vcm->dynamicVirtualChannels);	count = ArrayList_Count(vcm->dynamicVirtualChannels);	for (index = 0; index < count; index++)	{		channel = (rdpPeerChannel*) ArrayList_GetItem(vcm->dynamicVirtualChannels, index);		if (channel->channelId == ChannelId)		{			found = TRUE;			break;		}	}	ArrayList_Unlock(vcm->dynamicVirtualChannels);	return found ? channel : NULL;}
开发者ID:Auto-Droid,项目名称:FreeRDP,代码行数:26,


示例13: shadow_client_boardcast_msg

int shadow_client_boardcast_msg(rdpShadowServer* server, void* context, UINT32 type, SHADOW_MSG_OUT* msg, void* lParam){	wMessage message = {0};	rdpShadowClient* client = NULL;	int count = 0;	int index = 0;	message.context = context;	message.id = type;	message.wParam = (void *)msg;	message.lParam = lParam;	message.Free = shadow_msg_out_release;	/* First add reference as we reference it in this function.     * Therefore it would not be free'ed during post. */	shadow_msg_out_addref(&message);	ArrayList_Lock(server->clients);	for (index = 0; index < ArrayList_Count(server->clients); index++)	{		client = (rdpShadowClient*)ArrayList_GetItem(server->clients, index);		if (shadow_client_dispatch_msg(client, &message))		{			count++;		}	}	ArrayList_Unlock(server->clients);    /* Release the reference for this function */	shadow_msg_out_release(&message);	return count;}
开发者ID:Graf3x,项目名称:FreeRDP,代码行数:33,


示例14: tsmf_presentation_find_by_id

TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE *guid){	UINT32 index;	UINT32 count;	BOOL found = FALSE;	char guid_str[GUID_SIZE * 2 + 1];	TSMF_PRESENTATION* presentation;	ArrayList_Lock(presentation_list);	count = ArrayList_Count(presentation_list);	for (index = 0; index < count; index++)	{		presentation = (TSMF_PRESENTATION*) ArrayList_GetItem(presentation_list, index);		if (memcmp(presentation->presentation_id, guid, GUID_SIZE) == 0)		{			found = TRUE;			break;		}	}	ArrayList_Unlock(presentation_list);	if (!found)		WLog_WARN(TAG, "presentation id %s not found", guid_to_string(guid, guid_str, sizeof(guid_str)));	return (found) ? presentation : NULL;}
开发者ID:artemh,项目名称:FreeRDP,代码行数:29,


示例15: AreaFilter_ccw

bool AreaFilter_ccw (ArrayList* points, int i, int j, int k){	double a = ((FilterPoint*)ArrayList_GetItem(points, i))->x - ((FilterPoint*)ArrayList_GetItem(points, j))->x;	double b = ((FilterPoint*)ArrayList_GetItem(points, i))->y - ((FilterPoint*)ArrayList_GetItem(points, j))->y;	double c = ((FilterPoint*)ArrayList_GetItem(points, k))->x - ((FilterPoint*)ArrayList_GetItem(points, j))->x;	double d = ((FilterPoint*)ArrayList_GetItem(points, k))->y - ((FilterPoint*)ArrayList_GetItem(points, j))->y;		return ((a * d - b * c) <= 0.0);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:9,


示例16: tsmf_presentation_set_geometry_info

BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation,		UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT *rects){	UINT32 index;	UINT32 count;	TSMF_STREAM* stream;	void *tmp_rects = NULL;	BOOL ret = TRUE;	/* The server may send messages with invalid width / height.	 * Ignore those messages. */	if (!width || !height)		return TRUE;	/* Streams can be added/removed from the presentation and the server will resend geometry info when a new stream is 	 * added to the presentation. Also, num_rects is used to indicate whether or not the window is visible.	 * So, always process a valid message with unchanged position/size and/or no visibility rects.	 */	presentation->x = x;	presentation->y = y;	presentation->width = width;	presentation->height = height;		tmp_rects = realloc(presentation->rects, sizeof(RDP_RECT) * num_rects);	if(!num_rects)		presentation->rects=NULL;	if (!tmp_rects&&num_rects)		return;	presentation->nr_rects = num_rects;	presentation->rects = tmp_rects;	CopyMemory(presentation->rects, rects, sizeof(RDP_RECT) * num_rects);	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);		if (!stream->decoder)			continue;		if (stream->decoder->UpdateRenderingArea)		{			ret = stream->decoder->UpdateRenderingArea(stream->decoder, x, y, width, height, num_rects, rects);		}	}	ArrayList_Unlock(presentation->stream_list);	return ret;}
开发者ID:artemh,项目名称:FreeRDP,代码行数:57,


示例17: tsmf_presentation_set_geometry_info

BOOL tsmf_presentation_set_geometry_info(TSMF_PRESENTATION* presentation,		UINT32 x, UINT32 y, UINT32 width, UINT32 height, int num_rects, RDP_RECT *rects){	UINT32 index;	UINT32 count;	TSMF_STREAM* stream;	void *tmp_rects;	BOOL ret = TRUE;	if (num_rects < 1 || !rects)		return TRUE;	/* The server may send messages with invalid width / height.	 * Ignore those messages. */	if (!width || !height)		return TRUE;	if ((width == presentation->width) && (height == presentation->height) &&			(x == presentation->x) && (y == presentation->y) &&			(num_rects == presentation->nr_rects) &&			(0 == memcmp(rects, presentation->rects, num_rects * sizeof(RDP_RECT))))	{		return TRUE;	}	presentation->x = x;	presentation->y = y;	presentation->width = width;	presentation->height = height;	tmp_rects = realloc(presentation->rects, sizeof(RDP_RECT) * num_rects);	if (!tmp_rects)		return FALSE;	presentation->nr_rects = num_rects;	presentation->rects = tmp_rects;	CopyMemory(presentation->rects, rects, sizeof(RDP_RECT) * num_rects);	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);		if (!stream->decoder)			continue;		if (stream->decoder->UpdateRenderingArea)		{			ret = stream->decoder->UpdateRenderingArea(stream->decoder, x, y, width, height, num_rects, rects);		}	}	ArrayList_Unlock(presentation->stream_list);	return ret;}
开发者ID:BUGgs,项目名称:FreeRDP,代码行数:57,


示例18: AreaFilter_CreateConvexHull

// Create the convex hull of a point set.ArrayList* AreaFilter_CreateConvexHull (AreaFilter* self, ArrayList* points){	int chn = AreaFilter_CreateHull (self, points);		ArrayList* hull = ArrayList_new0 (NULL);	int k;	for (k = 0 ; k < chn ; ++k)		ArrayList_AddItem(hull, ArrayList_GetItem (points, k));				  	return (hull);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:12,


示例19: MatchKeys_FindMatchesBBF

ArrayList* MatchKeys_FindMatchesBBF (ArrayList* keys1, ArrayList* keys2){	// TODO: swap so smaller list is searched.    	ArrayList* al = ArrayList_new0 (NULL);	int i;	for (i=0; i<ArrayList_Count(keys2); i++)		ArrayList_AddItem (al, ArrayList_GetItem(keys2, i));		KDTree* kd = KDTree_CreateKDTree (al);	ArrayList_delete(al);	ArrayList* matches = ArrayList_new0 (Match_delete);	int j;	for (j=0; j<ArrayList_Count(keys1); j++) {		KeypointN* kp = (KeypointN*) ArrayList_GetItem(keys1, j);		ArrayList* kpNNList = (ArrayList*)KDTree_NearestNeighbourListBBF (kd, (IKDTreeDomain*)kp, 2, 40);				if (ArrayList_Count(kpNNList) < 2)			FatalError ("BUG: less than two neighbours!");		KDTreeBestEntry* be1 = (KDTreeBestEntry*) ArrayList_GetItem(kpNNList, 0);		KDTreeBestEntry* be2 = (KDTreeBestEntry*) ArrayList_GetItem(kpNNList, 1);		if ((be1->distance / be2->distance) > 0.6)			continue;				KeypointN* kpN = (KeypointN*)KDTreeBestEntry_Neighbour(be1);				ArrayList_AddItem(matches, Match_new (kp, kpN, be1->distance, be2->distance));		/*		WriteLine ("(%d,%d) (%d,%d) %d, 2nd: %d", (int)(kp->x + 0.5),			   (int)(kp->y + 0.5), (int)(kpN->x + 0.5),			   (int)(kpN->y + 0.5), be1->distance, be2->distance);		*/	}		return (matches);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:41,


示例20: xf_event_execute_action_script

int xf_event_execute_action_script(xfContext* xfc, XEvent* event){	int index;	int count;	char* name;	int exitCode;	FILE* actionScript;	BOOL match = FALSE;	const char* xeventName;	char buffer[1024] = { 0 };	char command[1024] = { 0 };	if (!xfc->actionScript)		return 1;	if (event->type > (sizeof(X11_EVENT_STRINGS) / sizeof(const char*)))		return 1;	xeventName = X11_EVENT_STRINGS[event->type];	count = ArrayList_Count(xfc->xevents);	for (index = 0; index < count; index++)	{		name = (char*) ArrayList_GetItem(xfc->xevents, index);		if (_stricmp(name, xeventName) == 0)		{			match = TRUE;			break;		}	}	if (!match)		return 1;	sprintf_s(command, sizeof(command), "%s xevent %s %d",			xfc->actionScript, xeventName, (int) xfc->window->handle);	actionScript = popen(command, "r");	if (actionScript < 0)		return -1;	while (fgets(buffer, sizeof(buffer), actionScript))	{		strtok(buffer, "/n");	}	exitCode = pclose(actionScript);	return 1;}
开发者ID:BenoitDevolutions,项目名称:FreeRDP,代码行数:53,


示例21: xf_event_execute_action_script

static BOOL xf_event_execute_action_script(xfContext* xfc, XEvent* event){	int index;	int count;	char* name;	FILE* actionScript;	BOOL match = FALSE;	const char* xeventName;	char buffer[1024] = { 0 };	char command[1024] = { 0 };	if (!xfc->actionScriptExists || !xfc->xevents)		return FALSE;	if (event->type > LASTEvent)		return FALSE;	xeventName = x11_event_string(event->type);	count = ArrayList_Count(xfc->xevents);	for (index = 0; index < count; index++)	{		name = (char*) ArrayList_GetItem(xfc->xevents, index);		if (_stricmp(name, xeventName) == 0)		{			match = TRUE;			break;		}	}	if (!match)		return FALSE;	sprintf_s(command, sizeof(command), "%s xevent %s %lu",	          xfc->context.settings->ActionScript, xeventName, (unsigned long) xfc->window->handle);	actionScript = popen(command, "r");	if (!actionScript)		return FALSE;	while (fgets(buffer, sizeof(buffer), actionScript))	{		strtok(buffer, "/n");	}	pclose(actionScript);	return TRUE;}
开发者ID:mfleisz,项目名称:FreeRDP,代码行数:49,


示例22: AreaFilter_MakeChain

int AreaFilter_MakeChain (AreaFilter* self, ArrayList* points, int (*comp)(const FilterPoint*, const FilterPoint*)){	IComparator comparator;	comparator.compareTo = (int ( *)(IComparator *,const void *,const void *)) comp;	ArrayList_Sort(points, &comparator);		int s = 1;	int pCount = ArrayList_Count(points);	int i;	for (i = 2 ; i < pCount ; ++i) {		int j;		for (j = s ; j >= 1 && AreaFilter_ccw (points, i, j, j - 1) ; --j)			;				s = j + 1;				// Swap		FilterPoint* t = (FilterPoint*) ArrayList_GetItem(points, s);		ArrayList_SetItem(points, s, ArrayList_GetItem(points, i));		ArrayList_SetItem(points, i, t);	}		return (s);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:24,


示例23: tsmf_presentation_sync

void tsmf_presentation_sync(TSMF_PRESENTATION* presentation){	UINT32 index;	UINT32 count;	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		TSMF_STREAM* stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);		WaitForSingleObject(stream->ready, 500);	}	ArrayList_Unlock(presentation->stream_list);}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:15,


示例24: AreaFilter_CreateHull

int AreaFilter_CreateHull (AreaFilter* self, ArrayList* points){	int u = AreaFilter_MakeChain (self, points, AreaFilter_CompareLow);		if (ArrayList_Count(points) == 0)		return (0);	/*	  int k;	  for (k = 0 ; k < u ; ++k)	      WriteLine ("point %d: %f %f", k, ((FilterPoint*)ArrayList_GetItem(points, k)[k])->x,                                        	       ((FilterPoint*)ArrayList_GetItem(points, k)[k])->y);	*/	ArrayList* pointsHigh = ArrayList_new(ArrayList_Count(points)+1-u, NULL);	//WriteLine ("points.Length = %d, u = %d", ArrayList_Count(points), u);		ArrayList_Copy (points, u, pointsHigh, 0, ArrayList_Count(points) - u);	ArrayList_SetItem(pointsHigh, ArrayList_Count(pointsHigh) - 1,  ArrayList_GetItem(points, 0));	int h = AreaFilter_MakeChain (self, pointsHigh, AreaFilter_CompareHigh);		int p;	for ( p = u ; p < ArrayList_Count(points) ; ++p) {		ArrayList_SetItem(points, p, ArrayList_GetItem(pointsHigh, p-u));	}		/*	  WriteLine ("h = %d, u = %d", h, u);	  int k;	  for (k = 0 ; k < (h + u) ; ++k)	      WriteLine ("point %d: %f %f", k, ((FilterPoint*)ArrayList_GetItem(points, k)[k])->x,                                        	       ((FilterPoint*)ArrayList_GetItem(points, k)[k])->y);	*/	return (h + u);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:36,


示例25: tsmf_presentation_start

void tsmf_presentation_start(TSMF_PRESENTATION* presentation){	UINT32 index;	UINT32 count;	TSMF_STREAM* stream;	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);		tsmf_stream_start(stream);	}	ArrayList_Unlock(presentation->stream_list);}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:16,


示例26: tsmf_presentation_volume_changed

void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, UINT32 newVolume, UINT32 muted){	UINT32 index;	UINT32 count;	TSMF_STREAM* stream;	presentation->volume = newVolume;	presentation->muted = muted;	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		stream = (TSMF_STREAM *) ArrayList_GetItem(presentation->stream_list, index);		tsmf_stream_change_volume(stream, newVolume, muted);	}	ArrayList_Unlock(presentation->stream_list);}
开发者ID:EmiyaShilong,项目名称:FreeRDP,代码行数:18,


示例27: tsmf_presentation_restarted

BOOL tsmf_presentation_restarted(TSMF_PRESENTATION* presentation){	UINT32 index;	UINT32 count;	TSMF_STREAM* stream;	BOOL ret = TRUE;	ArrayList_Lock(presentation->stream_list);	count = ArrayList_Count(presentation->stream_list);	for (index = 0; index < count; index++)	{		stream = (TSMF_STREAM*) ArrayList_GetItem(presentation->stream_list, index);		ret &= tsmf_stream_restart(stream);	}	ArrayList_Unlock(presentation->stream_list);	return ret;}
开发者ID:JunaidLoonat,项目名称:FreeRDP,代码行数:18,


示例28: shadow_client_boardcast_quit

int shadow_client_boardcast_quit(rdpShadowServer* server, int nExitCode){	wMessageQueue* queue = NULL;	int count = 0;	int index = 0;	ArrayList_Lock(server->clients);	for (index = 0; index < ArrayList_Count(server->clients); index++)	{		queue = ((rdpShadowClient*)ArrayList_GetItem(server->clients, index))->MsgQueue;		if (MessageQueue_PostQuit(queue, nExitCode))		{			count++;		}	}	ArrayList_Unlock(server->clients);	return count;}
开发者ID:Graf3x,项目名称:FreeRDP,代码行数:19,


示例29: rpc_client_call_find_by_id

RpcClientCall* rpc_client_call_find_by_id(rdpRpc* rpc, UINT32 CallId){	int index;	int count;	RpcClientCall* clientCall;	ArrayList_Lock(rpc->client->ClientCallList);	clientCall = NULL;	count = ArrayList_Count(rpc->client->ClientCallList);	for (index = 0; index < count; index++)	{		clientCall = (RpcClientCall*) ArrayList_GetItem(rpc->client->ClientCallList, index);		if (clientCall->CallId == CallId)			break;	}	ArrayList_Unlock(rpc->client->ClientCallList);	return clientCall;}
开发者ID:a1154043439,项目名称:FreeRDP,代码行数:20,


示例30: MultiMatch_CreatePointList

ArrayList* MultiMatch_CreatePointList (MultiMatch* self, ArrayList* matches){	ArrayList* points = ArrayList_new0 (FilterPoint_delete);	// Create a point list.	int i;	for(i=0; i<ArrayList_Count(matches); i++) {		Match* m = (Match*) ArrayList_GetItem(matches, i);		FilterPoint* p = FilterPoint_new0 ();		p->x = m->kp1->x;		p->y = m->kp1->y;		p->user = m;		WriteLine ("%f %f # CPOINTS", p->x, p->y);		ArrayList_AddItem(points, p);	}		return (points);}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:20,



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


C++ ArrayList_Unlock函数代码示例
C++ ArrayList_Count函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。