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