Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeBoolean.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModelAPI_AttributeBoolean.h
4 // Created:     2 june 2014
5 // Author:      Vitaly Smetannikov
6
7 #ifndef MODELAPI_ATTRIBUTEBOOLEAN_H_
8 #define MODELAPI_ATTRIBUTEBOOLEAN_H_
9
10 #include "ModelAPI_Attribute.h"
11
12 /**\class ModelAPI_AttributeBoolean
13  * \ingroup DataModel
14  * \brief Attribute that contains boolean value.
15  */
16
17 class ModelAPI_AttributeBoolean : public ModelAPI_Attribute
18 {
19  public:
20   /// Defines the double value
21   MODELAPI_EXPORT virtual void setValue(bool theValue) = 0;
22
23   /// Returns the double value
24   MODELAPI_EXPORT virtual bool value() = 0;
25
26   /// Returns the type of this class of attributes
27   MODELAPI_EXPORT static std::string type()
28   {
29     return "Boolean";
30   }
31
32   /// Returns the type of this class of attributes, not static method
33   MODELAPI_EXPORT virtual std::string attributeType();
34
35   /// To virtually destroy the fields of successors
36   MODELAPI_EXPORT virtual ~ModelAPI_AttributeBoolean();
37
38  protected:
39   /// Objects are created for features automatically
40   MODELAPI_EXPORT ModelAPI_AttributeBoolean();
41 };
42
43 typedef std::shared_ptr<ModelAPI_AttributeBoolean> AttributeBooleanPtr;
44
45 #endif