00001 00002 // X3D_InlineLoaderStateVariables.h // 00004 00005 #ifndef INLINELOADERGLOBALVARIABLES_H 00006 #define INLINELOADERGLOBALVARIABLES_H 00007 00008 #include "StateVariables.h" 00009 #include "X3D_X3DNode.h" 00010 #include "X3D_X3DLoader.h" 00011 00012 #include <list> 00013 00014 namespace X3DTK { 00015 namespace X3D { 00016 00018 00019 class InlineLoaderStateVariables : public StateVariables 00020 { 00021 public: 00023 InlineLoaderStateVariables(); 00025 virtual ~InlineLoaderStateVariables(); 00027 virtual void init(); 00029 virtual void finish(); 00030 00032 void addVisitedNode(SFNode N); 00034 void pushNode(SFNode N); 00036 void popNode(); 00038 void setForce(bool force); 00039 00041 inline bool hasInline() const {return _hasInline;}; 00043 inline X3DLoader *getLoader() const {return _loader;}; 00045 inline SFNode getTop() const {return (!_nodeStack.empty() ? _nodeStack.front() : 0);}; 00047 inline bool isForced() const {return _force;}; 00048 00049 private: 00050 bool _hasInline; 00051 bool _force; 00052 MFNode _nodeStack; 00053 std::list<SFNode> _visitedNodeList; 00054 X3DLoader *_loader; 00055 }; 00056 00057 } 00058 } 00059 00060 #endif