Salome HOME
New Attribute - "String" added into the model.
[modules/shaper.git] / src / Model / Model_AttributeString.h
1 // File:        Model_AttributeString.h
2 // Created:     2 june 2014
3 // Author:      Vitaly Smetannikov
4
5 #ifndef Model_AttributeString_H_
6 #define Model_AttributeString_H_
7
8 #include <Model.h>
9 #include <ModelAPI_AttributeString.h>
10
11 #include <TDF_Label.hxx>
12 #include <Handle_TDataStd_Name.hxx>
13
14 #include <string>
15
16 /**\class Model_AttributeString
17  * \ingroup DataModel
18  * \brief Attribute that contains std (null terminated) string.
19  */
20
21 class Model_AttributeString : public ModelAPI_AttributeString
22 {
23   Handle_TDataStd_Name myString;  ///< double is Real attribute
24  public:
25   /// Defines the double value
26   MODEL_EXPORT virtual void setValue(const std::string& theValue);
27
28   /// Returns the double value
29   MODEL_EXPORT virtual std::string value();
30
31  protected:
32   /// Initializes attibutes
33   Model_AttributeString(TDF_Label& theLabel);
34
35   friend class Model_Data;
36 };
37
38 #endif