14 #include "vrmlParser.h"
31 get_value(
const char *field_name)
const {
32 Fields::const_iterator fi;
33 for (fi = _fields.begin(); fi != _fields.end(); ++fi) {
34 if (strcmp((*fi)._type->name, field_name) == 0) {
35 return ((*fi)._value);
45 cerr <<
"No such field defined for type " << _type->getName() <<
": "
46 << field_name <<
"\n";
54 output(ostream &out,
int indent_level)
const {
55 out << _type->getName() <<
" {\n";
56 Fields::const_iterator fi;
57 for (fi = _fields.begin(); fi != _fields.end(); ++fi) {
58 indent(out, indent_level + 2) << (*fi)._type->name <<
" ";
59 output_value(out, (*fi)._value, (*fi)._type->type, indent_level + 2) <<
"\n";
61 indent(out, indent_level) <<
"}";
66 output(ostream &out,
int indent)
const {
69 output_value(out, v, SFNODE, indent);
72 ostream &operator << (ostream &out,
const VrmlScene &scene) {
73 VrmlScene::const_iterator si;
74 for (si = scene.begin(); si != scene.end(); ++si) {
This is our own Panda specialization on the default STL vector.