00001 00002 // SceneToFileGlobalVariables.h // 00004 00005 #ifndef SCENETOFILEGLOBALVARIABLES_H 00006 #define SCENETOFILEGLOBALVARIABLES_H 00007 00008 #include "GlobalVariables.h" 00009 #include "NameDict.h" 00010 00011 #include <list> 00012 00013 namespace X3DTK { 00014 00016 00017 class SceneToFileGlobalVariables : public GlobalVariables 00018 { 00019 public: 00021 SceneToFileGlobalVariables(); 00023 virtual ~SceneToFileGlobalVariables(); 00024 00026 void pushHasUSE(bool value); 00027 00029 void newLine(); 00031 void pushCurrentLine(); 00033 void writeCurrentLine(const SFString &string); 00035 void writeOpeningLine(const SFString &string); 00036 00038 void addTab(); 00040 void removeTab(); 00041 00043 inline MFString getOutput() const {return _output;}; 00045 bool hasChild(); 00047 void popLine(); 00049 inline bool getHasUSE() const {return _hasUSEStack.front();}; 00051 void popHasUSE(); 00053 inline SFString getTab() const {return _tab;}; 00055 SFString getDEF(const SFNode &N); 00057 SFString getUSE(const SFNode &N) const; 00058 00059 private: 00060 int _lineNumber; 00061 MFString _output; 00062 SFString _tab; 00063 std::list<int> _lineStack; 00064 std::list<bool> _hasUSEStack; 00065 std::list<SFString> _DEFList; 00066 }; 00067 00068 } 00069 00070 #endif