]> SALOME platform Git repositories - modules/shaper.git/blob - src/Config/Config_AttributeMessage.h
Salome HOME
Issue #273: Add copyright string
[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 to pass an attribute's (widget's) entry info extracted from xml file.
14  * <widget id="tool_object" concealment="true" obligatory="0"/>
15  */
16 class Config_AttributeMessage : public Events_Message
17 {
18   std::string myAttributeId;  //Feature unique id
19   std::string myFeatureId;  //Feature unique id
20   bool myIsObligatory;
21   bool myIsConcealment;
22
23  public:
24   // Same event as Config_FeatureMessage::MODEL_EVENT()
25   inline static const char* MODEL_EVENT()
26   {
27     return Config_FeatureMessage::MODEL_EVENT();
28   }
29
30   //const Events_ID theID, const void* theSender = 0
31   CONFIG_EXPORT Config_AttributeMessage(const Events_ID theId, const void* theParent = 0);
32   CONFIG_EXPORT virtual ~Config_AttributeMessage();
33
34   //Auto-generated getters/setters
35   CONFIG_EXPORT const std::string& attributeId() const;
36   CONFIG_EXPORT const std::string& featureId() const;
37   CONFIG_EXPORT bool isObligatory() const;
38   CONFIG_EXPORT bool isConcealment() const;
39
40   CONFIG_EXPORT void setAttributeId(const std::string& theId);
41   CONFIG_EXPORT void setFeatureId(const std::string& id);
42   CONFIG_EXPORT void setConcealment(bool isConcealment);
43   CONFIG_EXPORT void setObligatory(bool isObligatory);
44 };
45
46 #endif // ATTRIBUTE_MESSAGE_H