Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeString.h
1 // File:        ModelAPI_AttributeString.h
2 // Created:     2 Apr 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef MODELAPI_ATTRIBUTESTRING_H_
6 #define MODELAPI_ATTRIBUTESTRING_H_
7
8 #include "ModelAPI_Attribute.h"
9
10 #include <string>
11
12 /**\class ModelAPI_AttributeString
13  * \ingroup DataModel
14  * \brief API for the attribute that contains std (null terminated) string.
15  */
16
17 class ModelAPI_AttributeString : public ModelAPI_Attribute
18 {
19  public:
20   /// Defines the double value
21   MODELAPI_EXPORT virtual void setValue(const std::string& theValue) = 0;
22
23   /// Returns the double value
24   MODELAPI_EXPORT virtual std::string value() = 0;
25
26   /// Returns the type of this class of attributes
27   MODELAPI_EXPORT static std::string type()
28   {
29     return "String";
30   }
31
32   /// Returns the type of this class of attributes, not static method
33   MODELAPI_EXPORT virtual std::string attributeType()
34   {
35     return type();
36   }
37
38   /// To virtually destroy the fields of successors
39   MODELAPI_EXPORT virtual ~ModelAPI_AttributeString()
40   {
41   }
42
43  protected:
44   /// Objects are created for features automatically
45   MODELAPI_EXPORT ModelAPI_AttributeString()
46   {
47   }
48 };
49
50 //! Pointer on double attribute
51 typedef boost::shared_ptr<ModelAPI_AttributeString> AttributeStringPtr;
52
53 #endif