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); 00040 void setPath(const SFString &path); 00041 00043 inline bool hasInline() const {return _hasInline;}; 00045 inline X3DLoader *getLoader() const {return _loader;}; 00047 inline SFNode getTop() const {return (!_nodeStack.empty() ? _nodeStack.front() : 0);}; 00049 inline bool isForced() const {return _force;}; 00051 inline SFString getPath() const {return _path;}; 00052 00053 private: 00054 bool _hasInline; 00055 bool _force; 00056 MFNode _nodeStack; 00057 std::list<SFNode> _visitedNodeList; 00058 X3DLoader *_loader; 00059 SFString _path; 00060 }; 00061 00062 } 00063 } 00064 00065 #endif