本文整理汇总了C++中SimpleList::start方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleList::start方法的具体用法?C++ SimpleList::start怎么用?C++ SimpleList::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleList
的用法示例。
在下文中一共展示了SimpleList::start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}