Files Classes Functions Hierarchy
#include <vrmlshapeparse.h>
Public Member Functions | |
| void | eval (vrmlshapeparse &p) const |
| Iterate over a group of tokens and eval(vrmlshapeparse&) on the token if a match occures. | |
| ~vrmlshapetokengroup () | |
| Clean up pointers allocated by client. | |
Public Attributes | |
| vector< vrmlshapetoken * > | tokens |
| Client inserts tokens with new operator. | |
The parser looks for the current token within the tokens vector. The first match is done. So for all unique tokens the order of the tokens vector does not matter.
Definition at line 85 of file vrmlshapeparse.h.
| vrmlshapetokengroup::~vrmlshapetokengroup | ( | ) |
| void vrmlshapetokengroup::eval | ( | vrmlshapeparse & | p | ) | const |
Iterate over a group of tokens and eval(vrmlshapeparse&) on the token if a match occures.
Definition at line 97 of file vrmlshapeparse.cpp.
References tokens, and vrmlshapeparse::tokenstream.
Referenced by vrmlshapeMaterial::depth(), vrmlshapeIndexedFaceSet::depth(), vrmlshapeIndexedLineSet::depth(), and vrmlshapeShape::depth().
00098 { 00099 uint kmax = tokens.size(); 00100 uint k=0; 00101 bool res(false); 00102 for ( ; k<kmax; ++k) 00103 { 00104 00105 tokens[k]->eval(res,p); 00106 if (res) 00107 return; 00108 } 00109 00110 if (res==false) 00111 ++p.tokenstream; 00112 00113 /* 00114 00115 vector< vrmlshapetoken* >::const_iterator k = tokens.begin(); 00116 vector< vrmlshapetoken* >::const_iterator kend = tokens.end(); 00117 00118 bool res = false; 00119 // cout << "> " << p.tokenstream() << endl; 00120 while ((k!=kend) && (res==false)) 00121 { 00122 (*k)->eval(res,p); 00123 ++k; 00124 } 00125 // If the token was not consumed/processed, consume it. 00126 if (res==false) 00127 ++p.tokenstream; 00128 */ 00129 }
| vector< vrmlshapetoken * > vrmlshapetokengroup::tokens |
Client inserts tokens with new operator.
Definition at line 90 of file vrmlshapeparse.h.
Referenced by eval(), vrmlshapeIndexedFaceSet::vrmlshapeIndexedFaceSet(), vrmlshapeIndexedLineSet::vrmlshapeIndexedLineSet(), vrmlshapeMaterial::vrmlshapeMaterial(), vrmlshapeShape::vrmlshapeShape(), and ~vrmlshapetokengroup().
1.5.8