00001 #ifndef X3DTK_X3D_INLINELOADERSTATEVARIABLES_H 00002 #define X3DTK_X3D_INLINELOADERSTATEVARIABLES_H 00003 00004 #include "StateVariables.h" 00005 #include "X3D_X3DNode.h" 00006 #include "X3DLoader.h" 00007 00008 #include <list> 00009 00010 namespace X3DTK { 00011 namespace X3D { 00012 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