1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_AttributeString.h
4 // Created: 25 august 2014
7 #ifndef MODEL_ATTRIBUTESTRING_H_
8 #define MODEL_ATTRIBUTESTRING_H_
11 #include <ModelAPI_AttributeString.h>
13 #include <TDF_Label.hxx>
14 #include <TDataStd_Name.hxx>
18 /**\class Model_AttributeString
20 * \brief Attribute that contains std (null terminated) string.
23 class Model_AttributeString : public ModelAPI_AttributeString
25 Handle_TDataStd_Name myString; ///< container of the string value
26 TDF_Label myLab; ///< if attribute is not initialized, store label here
28 /// Defines the std::string value
29 MODEL_EXPORT virtual void setValue(const std::string& theValue);
31 /// Returns the std::string value
32 MODEL_EXPORT virtual std::string value();
35 /// Initializes attibutes
36 Model_AttributeString(TDF_Label& theLabel);
37 /// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
38 virtual void reinit();
40 friend class Model_Data;