本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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;
}