proj home

Files   Classes   Functions   Hierarchy  

vrmlshapecoordIndex Class Reference

Identify VRML coordIndex. More...

#include <vrmlshapeparse.h>

Inheritance diagram for vrmlshapecoordIndex:
Collaboration diagram for vrmlshapecoordIndex:

List of all members.

Public Member Functions

 vrmlshapecoordIndex ()
 A Coordinate index token.
void eval (vrmlshapeparse &p) const
 Expecting [ 9 1 0 -1 10 .


Detailed Description

Identify VRML coordIndex.

Definition at line 300 of file vrmlshapeparse.h.


Constructor & Destructor Documentation

vrmlshapecoordIndex::vrmlshapecoordIndex (  )  [inline]

A Coordinate index token.

Definition at line 306 of file vrmlshapeparse.h.

00307     : vrmlshapetoken("coordIndex") {}


Member Function Documentation

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 }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:24 2011 for Chelton Evans Source by  doxygen 1.5.8