+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: Model_AttributeString.h
-// Created: 2 june 2014
-// Author: Vitaly Smetannikov
+// Created: 25 august 2014
+// Author: sbh
-#ifndef Model_AttributeString_H_
-#define Model_AttributeString_H_
+#ifndef MODEL_ATTRIBUTESTRING_H_
+#define MODEL_ATTRIBUTESTRING_H_
#include <Model.h>
#include <ModelAPI_AttributeString.h>
#include <TDF_Label.hxx>
-#include <Handle_TDataStd_Name.hxx>
+#include <TDataStd_Name.hxx>
#include <string>
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;
};