1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef DFDOCUMENT_HXX
21 #define DFDOCUMENT_HXX
23 #include "DF_definitions.hxx"
24 #include "DF_Label.hxx"
30 //Class DF_Document is container for user's data stored as a tree of Labels
31 //with assigned Attributes
35 Standard_EXPORT DF_Document(const std::string& theDocumentType);
37 Standard_EXPORT ~DF_Document();
39 Standard_EXPORT DF_Application* GetApplication();
41 //Returns a Label of this Document with entry "0:1"
42 Standard_EXPORT DF_Label Main();
44 //Returns a root Label with entry "0:"
45 Standard_EXPORT DF_Label Root();
47 //Returns an ID of this
48 Standard_EXPORT int GetDocumentID() const;
50 //Returns a type of the Document
51 Standard_EXPORT std::string GetDocumentType();
53 //Clears the content of this Document
54 Standard_EXPORT void Clear();
56 //Returns true if this document is empty
57 Standard_EXPORT bool IsEmpty();
59 //Returns true if this document is modified
60 Standard_EXPORT bool IsModified();
62 //Returns true if this document is modified
63 Standard_EXPORT void SetModified(bool isModified);
65 //########### Load/Save virtual methods ##
67 //Restores a content of the Document from the std::string theData
68 Standard_EXPORT virtual void Load(const std::string& theData);
70 //Converts a content of the Document into the std::string
71 Standard_EXPORT virtual std::string Save();
73 friend class DF_Application;
81 DF_Application* _appli;