00001 #ifndef IGUANA_STUDIO_IG_DOCUMENT_DATA_H 00002 # define IGUANA_STUDIO_IG_DOCUMENT_DATA_H 00003 00004 //<<<<<< INCLUDES >>>>>> 00005 00006 # include "Iguana/Studio/interface/config.h" 00007 # include "Iguana/Framework/interface/IgStateElement.h" 00008 # include <map> 00009 00010 //<<<<<< PUBLIC DEFINES >>>>>> 00011 //<<<<<< PUBLIC CONSTANTS >>>>>> 00012 //<<<<<< PUBLIC TYPES >>>>>> 00013 00014 class IgDocument; 00015 class IgSimpleTwig; 00016 class IgTwig; 00017 00018 //<<<<<< PUBLIC VARIABLES >>>>>> 00019 //<<<<<< PUBLIC FUNCTIONS >>>>>> 00020 //<<<<<< CLASS DECLARATIONS >>>>>> 00021 00022 class IGUANA_STUDIO_API IgDocumentData : public IgStateElement 00023 { 00024 IG_DECLARE_STATE_ELEMENT (IgDocumentData); 00025 public: 00026 IgDocumentData (IgState *state, IgDocument *owner); 00027 ~IgDocumentData (void); 00028 // implicit copy constructor 00029 // implicit assignment operator 00030 00031 IgDocument * document (void); 00032 IgSimpleTwig * root (const std::string &name = "", 00033 bool create = false); 00034 void root (IgSimpleTwig *twig, 00035 const std::string &rootName = ""); 00036 IgSimpleTwig * add (const std::string &name, 00037 const std::string &rootName = ""); 00038 IgTwig * find (const std::string &name, 00039 const std::string &rootName = ""); 00040 00041 typedef std::map<std::string, IgSimpleTwig *> TwigMap; 00042 TwigMap::const_iterator begin (void); 00043 TwigMap::const_iterator end (void); 00044 00045 private: 00046 IgState *m_state; 00047 IgDocument *m_document; 00048 TwigMap m_rootMap; 00049 }; 00050 00051 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> 00052 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>> 00053 00054 #endif // IGUANA_STUDIO_IG_DOCUMENT_DATA_H