Files Classes Functions Hierarchy
#include <vrmlshapeparse.h>
Public Member Functions | |
| vrmlshapecoordIndex () | |
| A Coordinate index token. | |
| void | eval (vrmlshapeparse &p) const |
| Expecting [ 9 1 0 -1 10 . | |
Definition at line 300 of file vrmlshapeparse.h.
| vrmlshapecoordIndex::vrmlshapecoordIndex | ( | ) | [inline] |
A Coordinate index token.
Definition at line 306 of file vrmlshapeparse.h.
00307 : vrmlshapetoken("coordIndex") {}
| void vrmlshapecoordIndex::eval | ( | vrmlshapeparse & | p | ) | const [virtual] |
Expecting [ 9 1 0 -1 10 .
. ] in parser scope.
Implements vrmlshapetoken.
Definition at line 232 of file vrmlshapeparse.cpp.
References dbg, vrmlshapeparse::tokenstream, and vrmlshapeparse::vshp.
00233 { 00234 assert(p.vshp.empty()==false); 00235 ++p.tokenstream; 00236 assert(p.tokenstream()=="["); 00237 ++p.tokenstream; 00238 int x; 00239 while((p.tokenstream()!="]") && !p.tokenstream) 00240 { 00241 stringstream s(p.tokenstream()); 00242 s >> x; 00243 p.vshp.back().coordIndex.push_back(x); 00244 00245 ++p.tokenstream; 00246 } 00247 ++p.tokenstream; 00248 00249 #ifdef DEBUG_VRMLSHAPEPARSE 00250 dbg() << id << endl; 00251 #endif 00252 }
1.5.8