- bool ok;
- if (verbose) cout<<indent<<qName<<endl;
- typel=qName; shorttypel="";
- indent += " ";
- if (qName==version)
- {
- etat=1;
- return TRUE;
- }
-
- if (qName==neighbours)
- {
- etat=2;
- if (attrs.count()>0 && attrs.localName(0)==count)
- {
- neighbourscount=attrs.value(0).toLong(&ok, 10);
- neighbourcourant=-1;
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<neighbourscount<<endl;
- }
- return TRUE;
- }
-
- if (qName==neighbour)
- {
- etat=3;
- if (attrs.count()>0 && attrs.localName(0)==indice)
- {
- neighbourindice=attrs.value(0).toLong(&ok, 10);
- neighbourcourant++;
- //mailw.neighbourindices[mailw.neighbourcourant]=neighbourindice;
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<neighbourindice<<endl;
- }
- return TRUE;
- }
-
- if (qName==send)
- {
- etat=4;
- sendreceive="s/r=send ";
- shortsendreceive="SE ";
- return TRUE;
- }
-
- if (qName==receive)
- {
- etat=9;
- sendreceive="s/r=receive ";
- shortsendreceive="RE ";
- return TRUE;
- }
-
- if (qName==vertices)
- {
- etat=5;
- shorttypel="VE ";
- if (attrs.count()>0 && attrs.localName(0)==count)
- {
- nbcount=attrs.value(0).toLong(&ok, 10);
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<nbcount<<endl;
- }
- return TRUE;
- }
-
- if (qName==edges)
- {
- etat=6;
- shorttypel="ED ";
- if (attrs.count()>0 && attrs.localName(0)==count)
- {
- nbcount=attrs.value(0).toLong(&ok, 10);
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<nbcount<<endl;
- }
- return TRUE;
- }
-
- if (qName==faces)
- {
- etat=7;
- shorttypel="FA ";
- if (attrs.count()>0 && attrs.localName(0)==count)
- {
- nbcount=attrs.value(0).toLong(&ok, 10);
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<nbcount<<endl;
- }
- return TRUE;
- }
-
- if (qName==elements)
- {
- etat=8;
- shorttypel="EL ";
- if (attrs.count()>0 && attrs.localName(0)==count)
- {
- nbcount=attrs.value(0).toLong(&ok, 10);
- if (verbose) cout<<indent<<attrs.localName(0)<<
- "="<<nbcount<<endl;
- }
- return TRUE;
- }
-
- /*for( int i=0; i<attrs.count(); i++ )
- {
- cout<<indent<<attrs.localName(i)<<"="<<attrs.value(i)<<endl;
- }*/
-
- return TRUE;
+ bool ok;
+ if (verbose) std::cout<<indent.toLatin1().constData()<<qName.toLatin1().constData()<<std::endl;
+ typel=qName; shorttypel="";
+ indent += " ";
+ if (qName==version)
+ {
+ etat=1;
+ return true;
+ }
+
+ if (qName==neighbours)
+ {
+ etat=2;
+ if (attrs.count()>0 && attrs.localName(0)==count)
+ {
+ neighbourscount=attrs.value(0).toLong(&ok, 10);
+ neighbourcourant=-1;
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<neighbourscount<<std::endl;
+ }
+ return true;
+ }
+
+ if (qName==neighbour)
+ {
+ etat=3;
+ if (attrs.count()>0 && attrs.localName(0)==indice)
+ {
+ neighbourindice=attrs.value(0).toLong(&ok, 10);
+ neighbourcourant++;
+ //mailw.neighbourindices[mailw.neighbourcourant]=neighbourindice;
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<neighbourindice<<std::endl;
+ }
+ return true;
+ }
+
+ if (qName==send)
+ {
+ etat=4;
+ sendreceive="s/r=send ";
+ shortsendreceive="SE ";
+ return true;
+ }
+
+ if (qName==receive)
+ {
+ etat=9;
+ sendreceive="s/r=receive ";
+ shortsendreceive="RE ";
+ return true;
+ }
+
+ if (qName==vertices)
+ {
+ etat=5;
+ shorttypel="VE ";
+ if (attrs.count()>0 && attrs.localName(0)==count)
+ {
+ nbcount=attrs.value(0).toLong(&ok, 10);
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<nbcount<<std::endl;
+ }
+ return true;
+ }
+
+ if (qName==edges)
+ {
+ etat=6;
+ shorttypel="ED ";
+ if (attrs.count()>0 && attrs.localName(0)==count)
+ {
+ nbcount=attrs.value(0).toLong(&ok, 10);
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<nbcount<<std::endl;
+ }
+ return true;
+ }
+
+ if (qName==faces)
+ {
+ etat=7;
+ shorttypel="FA ";
+ if (attrs.count()>0 && attrs.localName(0)==count)
+ {
+ nbcount=attrs.value(0).toLong(&ok, 10);
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<nbcount<<std::endl;
+ }
+ return true;
+ }
+
+ if (qName==elements)
+ {
+ etat=8;
+ shorttypel="EL ";
+ if (attrs.count()>0 && attrs.localName(0)==count)
+ {
+ nbcount=attrs.value(0).toLong(&ok, 10);
+ if (verbose) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+ "="<<nbcount<<std::endl;
+ }
+ return true;
+ }
+
+ /*for( int i=0; i<attrs.count(); i++ )
+ {
+ std::cout<<indent.toLatin1().constData()<<attrs.localName(i).toLatin1().constData()<<"="<<attrs.value(i)<<std::endl;
+ }*/
+
+ return true;