1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef DFDOCUMENT_HXX
23 #define DFDOCUMENT_HXX
25 #include "DF_definitions.hxx"
26 #include "DF_Label.hxx"
32 //Class DF_Document is container for user's data stored as a tree of Labels
33 //with assigned Attributes
37 Standard_EXPORT DF_Document(const std::string& theDocumentType);
39 Standard_EXPORT ~DF_Document();
41 Standard_EXPORT DF_Application* GetApplication();
43 //Returns a Label of this Document with entry "0:1"
44 Standard_EXPORT DF_Label Main();
46 //Returns a root Label with entry "0:"
47 Standard_EXPORT DF_Label Root();
49 //Returns an ID of this
50 Standard_EXPORT int GetDocumentID() const;
52 //Returns a type of the Document
53 Standard_EXPORT std::string GetDocumentType();
55 //Clears the content of this Document
56 Standard_EXPORT void Clear();
58 //Returns true if this document is empty
59 Standard_EXPORT bool IsEmpty();
61 //Returns true if this document is modified
62 Standard_EXPORT bool IsModified();
64 //Returns true if this document is modified
65 Standard_EXPORT void SetModified(bool isModified);
67 //########### Load/Save virtual methods ##
69 //Restores a content of the Document from the std::string theData
70 Standard_EXPORT virtual void Load(const std::string& theData);
72 //Converts a content of the Document into the std::string
73 Standard_EXPORT virtual std::string Save();
75 friend class DF_Application;
83 DF_Application* _appli;