X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FDF%2FDF_Document.cxx;h=2144aae9a449d23d2afb5a9e2aeaaad58c1094e3;hb=HEAD;hp=47b9516e7a30513116e82fb909b02640998056c1;hpb=f14439749926cca959747bb79fda10529520bd0b;p=modules%2Fkernel.git diff --git a/src/DF/DF_Document.cxx b/src/DF/DF_Document.cxx index 47b9516e7..2144aae9a 100644 --- a/src/DF/DF_Document.cxx +++ b/src/DF/DF_Document.cxx @@ -1,18 +1,35 @@ +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + #include "DF_definitions.hxx" #include "DF_Document.hxx" #include "DF_Label.hxx" #include "DF_ChildIterator.hxx" -using namespace std; - //Class DF_Document is container for user's data stored as a tree of Labels //with assigned Attributes -DF_Document::DF_Document(const string& theDocumentType) +DF_Document::DF_Document(const std::string& theDocumentType) { _id = -1; _type = theDocumentType; - _modified = true; + _modified = false; } DF_Document::~DF_Document() @@ -61,7 +78,7 @@ int DF_Document::GetDocumentID() const } //Returns a type of the Document -string DF_Document::GetDocumentType() +std::string DF_Document::GetDocumentType() { return _type; } @@ -71,17 +88,18 @@ void DF_Document::Clear() { if(_root.IsNull()) return; - vector vn; + std::vector vn; DF_ChildIterator CI(_root, true); for(; CI.More(); CI.Next()) { DF_LabelNode* node = CI.Value()._node; if(node) vn.push_back(node); } - for(int i = 0, len = vn.size(); iReset(); + _root.Nullify(); } //Returns true if this document is empty @@ -112,13 +130,13 @@ void DF_Document::SetModified(bool isModified) //Restores a content of the Document from the std::string theData -void DF_Document::Load(const std::string& theData) +void DF_Document::Load(const std::string& /*theData*/) { //Not implemented } //Converts a content of the Document into the std::string -string DF_Document::Save() +std::string DF_Document::Save() { //Not implemented return "";