]> SALOME platform Git repositories - modules/shaper.git/blob - src/Config/Config_ValidatorMessage.h
Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / Config / Config_ValidatorMessage.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 /*
4  * Config_ValidatorMessage.h
5  *
6  *  Created on: 08 Jul 2014 �.
7  *      Author: sbh
8  */
9
10 #ifndef CONFIG_VALIDATORMESSAGE_H_
11 #define CONFIG_VALIDATORMESSAGE_H_
12
13 #include <Events_Message.h>
14 #include <Config_def.h>
15
16 #include <list>
17 #include <string>
18
19 /// Event ID that Validator is loaded (comes with Config_ValidatorMessage)
20 static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
21
22 /*!
23  * \class Config_ValidatorMessage
24  * \ingroup Config
25  * \brief Transmits info about created validator on "ValidatorLoaded" event
26  */
27 class Config_ValidatorMessage : public Events_Message
28 {
29   std::string myValidatorId;
30   std::string myFeatureId;
31   std::string myAttributeId;
32   std::list<std::string> myVaidatorParameters;
33
34  public:
35   CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void* theParent = 0);
36   CONFIG_EXPORT virtual ~Config_ValidatorMessage();
37
38   //! Get id of the filter
39   CONFIG_EXPORT const std::string& validatorId() const;
40   //! Get id of a feature to which the filter belongs to
41   CONFIG_EXPORT const std::string& featureId() const;
42   //! Get id of an attribute to which the filter belongs to
43   CONFIG_EXPORT const std::string& attributeId() const;
44   //! Get filter parameters
45   CONFIG_EXPORT const std::list<std::string>& parameters() const;
46   //! Returns true if validator id is not empty
47   CONFIG_EXPORT bool isValid() const;
48
49   //! Set id of the filter
50   CONFIG_EXPORT void setValidatorId(const std::string& theId);
51   //! Set id of a feature to which the filter belongs to
52   CONFIG_EXPORT void setFeatureId(const std::string& theId);
53   //! Set id of an attribute to which the filter belongs to
54   CONFIG_EXPORT void setAttributeId(const std::string& theId);
55   //! Get filter parameters
56   CONFIG_EXPORT void setValidatorParameters(const std::list<std::string>& parameters);
57 };
58
59 #endif /* Config_ValidatorMessage_H_ */