28 #ifndef __VRMLDRIVER__H__
29 #define __VRMLDRIVER__H__
35 #include <H3D/FlexLexer.h>
51 #define YYSTYPE std::string
55 struct VRMLFlexLexer :
public yyFlexLexer {
56 VRMLFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 ) :
57 yyFlexLexer( arg_yyin, arg_yyout ) {};
59 int yylex (YYSTYPE* yylval,
yy::location* yylloc, VrmlDriver& driver);
64 int VRMLFlexLexer::yylex (YYSTYPE* yylval, yy::location* , VrmlDriver& driver)
72 virtual ~VrmlDriver ();
81 *exported_nodes, PrototypeVector *prototypes );
86 void error (
const yy::location& l,
const std::string& m);
89 void error (
const std::string& m);
97 void setProtoField(
const string &name,
100 const string & value =
"" );
103 bool addDynamicField(
const string &name,
106 const string & value =
"" );
110 bool connectProtoField(
const string &proto_field,
const string &node_field );
114 Group *getRoot() {
return root.get(); }
115 void setFieldValue(
const char *);
116 void setNodeStatement(
int );
117 string getLocationString();
118 string getOldLocationString();
120 void addLine(
const char* );
123 inline bool insideProtoDeclaration() {
124 return !proto_declarations.empty();
130 inline bool insideTopMostProtoDeclaration() {
131 return proto_declarations.size() == 1;
136 inline bool insideDynamicFieldsObject() {
137 if( node_stack.empty() )
return false;
141 H3DUniquePtr< VRMLFlexLexer > lexer;
151 H3DUniquePtr< DEFNodes > local_DEF_map;
153 vector< Node* > node_stack;
154 vector< string > field_stack;
160 const char *file_name;
163 vector< ProtoDeclaration *> proto_declarations;
166 PrototypeVector *proto_vector;
170 H3DUniquePtr< PrototypeVector > local_proto_vector;
172 static PrototypeVector *global_proto_vector;
Contains the DEFNodes class.
Header file for Group, X3D scene-graph node.
Base class for all scripting node interfaces.
Header file for ProtoDeclaration.
Used by VRMLParser and X3D to implement a PROTO declaration.
AccessType
The different access types that a field can have.
Definition: Field.h:53
A Group node contains children nodes without introducing a new transformation.
Definition: Group.h:53
This abstract interface class is the base class for all classes that specify arbitrary fields.
Definition: H3DDynamicFieldsObject.h:128
This abstract node type is the base type for all prototype instances in the X3D system.
Definition: X3DPrototypeInstance.h:65
Provides a mapping between defined DEF names in X3D and the nodes they refer to.
Definition: DEFNodes.h:92
Abstract a location.
Definition: location.hh:57
H3D API namespace.
Definition: Anchor.h:38