Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API. Debug of unit...
[modules/shaper.git] / src / Model / Model_AttributeString.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        Model_AttributeString.h
4 // Created:     25 august 2014
5 // Author:      sbh
6
7 #ifndef MODEL_ATTRIBUTESTRING_H_
8 #define MODEL_ATTRIBUTESTRING_H_
9
10 #include <Model.h>
11 #include <ModelAPI_AttributeString.h>
12
13 #include <TDF_Label.hxx>
14 #include <TDataStd_Name.hxx>
15
16 #include <string>
17
18 /**\class Model_AttributeString
19  * \ingroup DataModel
20  * \brief Attribute that contains std (null terminated) string.
21  */
22
23 class Model_AttributeString : public ModelAPI_AttributeString
24 {
25   Handle_TDataStd_Name myString; ///< container of the string value
26   TDF_Label myLab; ///< if attribute is not initialized, store label here
27  public:
28   /// Defines the std::string value
29   MODEL_EXPORT virtual void setValue(const std::string& theValue);
30
31   /// Returns the std::string  value
32   MODEL_EXPORT virtual std::string value();
33
34  protected:
35   /// Initializes attibutes
36   Model_AttributeString(TDF_Label& theLabel);
37
38   friend class Model_Data;
39 };
40
41 #endif