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


C++ SimpleList::next方法代码示例

本文整理汇总了C++中SimpleList::next方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleList::next方法的具体用法?C++ SimpleList::next怎么用?C++ SimpleList::next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleList的用法示例。


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

示例1: flush

void OStream::flush() {
	if (m_buffer == NULL or m_last == NULL) return;

	waitLock();
	//Calculate buffer size
	int size = 0;
	SimpleList<String>* iter = m_buffer;
	for (; iter != 0; iter = iter->next()) {
		size += iter->v().size();
	}
	//Get stuff
	String buff(WChar(" "), size);
	iter = m_buffer;
	for (int i = 0, pos = 0; i < size; i++, pos++) {
		if (pos >= iter->v().size()) {
			iter = iter->next();
			pos = 0;
		}
		buff[i] = iter->v()[pos];
	}
	//Write it
	write(buff);

	delete m_buffer;
	m_buffer = NULL;
	m_last = NULL;

	unlock();
}
开发者ID:Alexis211,项目名称:Melon,代码行数:29,代码来源:OStream.proto.cpp

示例2: doCall

u32int Ressource::doCall(u8int id, u32int a, u32int b, u32int c, u32int d, u32int e) {
	for (SimpleList<call_t*> *iter = m_callTables; iter != 0; iter = iter->next()) {
		call_t* ct = iter->v();
		u32int i = 0;
		while (ct[i].id != 0) {
			call_t &ce = ct[i];
			if (ce.id == id) {
				if (ce.params == 0) return (this->*(ce.c0))();
				if (ce.params == 1) return (this->*(ce.c1))(a);
				if (ce.params == 2) return (this->*(ce.c2))(a, b);
				if (ce.params == 3) return (this->*(ce.c3))(a, b, c);
				if (ce.params == 4) return (this->*(ce.c4))(a, b, c, d);
				if (ce.params == 5) return (this->*(ce.c5))(a, b, c, d, e);
			}
			i++;
		}
	}
	return (u32int) - 1;
}
开发者ID:Alexis211,项目名称:Melon,代码行数:19,代码来源:Ressource.class.cpp

示例3: dumpList

void dumpList(SimpleList<MyNode>& l)
{
	MyNode	*n;

	if (!l.isEmpty()) {

		// Dump some details about the list

		cout << "Head Node: " << l.peekHead()->id() << endl;

		cout << "Contents of list (" << l.numberOfItems() << " items):";
		cout << endl << "    ";

		for (n = l.peekHead(); n; n = l.next(n))
			cout << n->id() << " ";
		}
	else
		cout << "Empty list (" << l.numberOfItems() << ")";

	cout << endl << endl;
}
开发者ID:OS2World,项目名称:DEV-UTIL-MGL,代码行数:21,代码来源:slisttst.cpp

示例4: ReadPolyLineData

/*-------------------------------------------------------------------*
 |  ReadPolyLineData                                                 |
 |  Inputs:                                                          |
 |      PDXF pDxf = pointer to the openning DXF file structure       |
 |      PDXFENTITYHEADER pEntityHeader =                             |
 |                  pointer to entity data header                    |
 |      PDXFENTLINE pPolyLine = pointer to PolyLine structure        |
 |  Output: TRUE if everything is ok                                 |
 *-------------------------------------------------------------------*/
BOOL ReadPolyLineData( PDXF pDxf, PDXFENTITYHEADER pEntityHeader, PDXFENTPOLYLINE pPolyLine )
{
	ZeroMemory(pPolyLine, sizeof(DXFENTPOLYLINE));

	pEntityHeader->EntityType = ENT_POLYLINE;
	pPolyLine->Flag = 0;

	ReadParamFromDxfFile(pDxf, GCode, strValue);	
	while(GCode!=0)
	{
		switch(GCode)
		{
		case 8:		// Layer Name
			strcpy(pEntityHeader->LayerName, strValue);
			break;
		case 62:	// Color
			pEntityHeader->Color = atoi(strValue);
			break;
		case 6:		// Line Type
			strcpy(pEntityHeader->LTypeName, strValue);
			break;
		case 39:	// Thickness
			pEntityHeader->Thickness = atof(strValue);
			break;	
		case 48:	// Linetype scale
			pEntityHeader->LineTypeScale = atof(strValue);
			break;
		case 70:	// Polyline flag (bit-coded); default is 0
			pPolyLine->Flag = atoi(strValue);
			break;	
 		}
		dxfStorePos(pDxf);
		ReadParamFromDxfFile(pDxf, GCode, strValue);
	}

	// Reading Vertex Data
	SimpleList<DXFENTVERTEX> vertices;
	DXFENTVERTEX Vertex;
	while((GCode==0) && (strcmp(strValue,"VERTEX")==0))
	{
		dxfStorePos(pDxf);
		ReadParamFromDxfFile(pDxf, GCode, strValue);	
		while(GCode!=0){
			switch(GCode)
			{
				case 10:	// Start point X
					Vertex.Point.x = atof(strValue);
					break;		
				case 20:	// Start point X
					Vertex.Point.y = atof(strValue);
					break;		
				case 30:	// Start point X
					Vertex.Point.z = atof(strValue);
					break;		
				case 42:	// Bulge (optional; default is 0)
					Vertex.Bulge = atof(strValue);
					break;		
 			}
			dxfStorePos(pDxf);
			ReadParamFromDxfFile(pDxf, GCode, strValue);
		}
		vertices.add(Vertex);		
	}

	pPolyLine->nVertex = vertices.getSize();
	pPolyLine->pVertex = new DXFENTVERTEX[pPolyLine->nVertex];
	int i=0;
	vertices.start();
	while (vertices.next()) {
		pPolyLine->pVertex[i] = vertices.get();		
		i++;
	}
	
	return TRUE;
}
开发者ID:malpharo,项目名称:AiPI,代码行数:84,代码来源:DREntities.cpp


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