Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / Config / Config_AttributeMessage.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #ifndef ATTRIBUTE_MESSAGE_H
4 #define ATTRIBUTE_MESSAGE_H
5
6 #include <Config_def.h>
7 #include <Config_FeatureMessage.h>
8 #include <Events_Message.h>
9
10 #include <string>
11
12 /*!
13  * \class Config_AttributeMessage
14  * \brief Class to pass an attribute's (widget's) entry info extracted from xml file.
15  * <widget id="tool_object" concealment="true" obligatory="0"/>
16  */
17 class Config_AttributeMessage : public Events_Message
18 {
19   std::string myAttributeId;  //Feature unique id
20   std::string myFeatureId;  //Feature unique id
21   bool myIsObligatory;
22   bool myIsConcealment;
23
24  public:
25   // Same event as Config_FeatureMessage::MODEL_EVENT()
26   inline static const char* MODEL_EVENT()
27   {
28     return Config_FeatureMessage::MODEL_EVENT();
29   }
30
31   //const Events_ID theID, const void* theSender = 0
32   CONFIG_EXPORT Config_AttributeMessage(const Events_ID theId, const void* theParent = 0);
33   CONFIG_EXPORT virtual ~Config_AttributeMessage();
34
35   //Auto-generated getters/setters
36   CONFIG_EXPORT const std::string& attributeId() const;
37   CONFIG_EXPORT const std::string& featureId() const;
38   CONFIG_EXPORT bool isObligatory() const;
39   CONFIG_EXPORT bool isConcealment() const;
40
41   CONFIG_EXPORT void setAttributeId(const std::string& theId);
42   CONFIG_EXPORT void setFeatureId(const std::string& id);
43   CONFIG_EXPORT void setConcealment(bool isConcealment);
44   CONFIG_EXPORT void setObligatory(bool isObligatory);
45 };
46
47 #endif // ATTRIBUTE_MESSAGE_H