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