X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_AttributeString.h;h=deabf77880c6b1a271fb7d34746ddc775f13bf5e;hb=f36409774efce7c530518a1553946c9c76526fb9;hp=2695cbcf5ee16f256dc953557378e652aba03f86;hpb=853952fd4ddc93c0cd6a7122d37b618199864396;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeString.h b/src/Model/Model_AttributeString.h index 2695cbcf5..deabf7788 100644 --- a/src/Model/Model_AttributeString.h +++ b/src/Model/Model_AttributeString.h @@ -1,15 +1,31 @@ -// File: Model_AttributeString.h -// Created: 2 june 2014 -// Author: Vitaly Smetannikov - -#ifndef Model_AttributeString_H_ -#define Model_AttributeString_H_ +// 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_ #include #include #include -#include +#include #include @@ -20,17 +36,20 @@ class Model_AttributeString : public ModelAPI_AttributeString { - Handle_TDataStd_Name myString; ///< double is Real attribute + Handle_TDataStd_Name myString; ///< container of the string value + TDF_Label myLab; ///< if attribute is not initialized, store label here public: - /// Defines the double value + /// Defines the std::string value MODEL_EXPORT virtual void setValue(const std::string& theValue); - /// Returns the double value + /// Returns the std::string value MODEL_EXPORT virtual std::string value(); 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; };