X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeString.h;h=deabf77880c6b1a271fb7d34746ddc775f13bf5e;hb=ca925f26180f15699a77e76461679f11abd499ba;hp=a75ddae6a6e3313b5177b18677e0c1b05944311c;hpb=c20717c0b994f654d4da7b9039e9f08c165929c3;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeString.h b/src/Model/Model_AttributeString.h index a75ddae6a..deabf7788 100644 --- a/src/Model/Model_AttributeString.h +++ b/src/Model/Model_AttributeString.h @@ -1,6 +1,22 @@ -// File: Model_AttributeString.h -// Created: 25 august 2014 -// Author: sbh +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// 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 +// #ifndef MODEL_ATTRIBUTESTRING_H_ #define MODEL_ATTRIBUTESTRING_H_ @@ -9,7 +25,7 @@ #include #include -#include +#include #include @@ -20,7 +36,8 @@ class Model_AttributeString : public ModelAPI_AttributeString { - Handle_TDataStd_Name myString; + Handle_TDataStd_Name myString; ///< container of the string value + TDF_Label myLab; ///< if attribute is not initialized, store label here public: /// Defines the std::string value MODEL_EXPORT virtual void setValue(const std::string& theValue); @@ -31,6 +48,8 @@ class Model_AttributeString : public ModelAPI_AttributeString protected: /// Initializes attibutes Model_AttributeString(TDF_Label& theLabel); + /// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc) + virtual void reinit(); friend class Model_Data; };