1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 * Config_ValidatorMessage.h
23 * Created on: 08 Jul 2014 �.
27 #ifndef CONFIG_VALIDATORMESSAGE_H_
28 #define CONFIG_VALIDATORMESSAGE_H_
30 #include <Events_Message.h>
31 #include <Config_def.h>
36 /// Event ID that Validator is loaded (comes with Config_ValidatorMessage)
37 static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
40 * \class Config_ValidatorMessage
42 * \brief Transmits info about created validator on "ValidatorLoaded" event
44 class Config_ValidatorMessage : public Events_Message
46 std::string myValidatorId;
47 std::string myFeatureId;
48 std::string myAttributeId;
49 std::list<std::string> myVaidatorParameters;
54 * \param theId - Events_ID of the message
55 * \param theParent - pointer to the sender
57 CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void* theParent = 0);
58 CONFIG_EXPORT virtual ~Config_ValidatorMessage();
60 //! Get id of the filter
61 CONFIG_EXPORT const std::string& validatorId() const;
62 //! Get id of a feature to which the filter belongs to
63 CONFIG_EXPORT const std::string& featureId() const;
64 //! Get id of an attribute to which the filter belongs to
65 CONFIG_EXPORT const std::string& attributeId() const;
66 //! Get filter parameters
67 CONFIG_EXPORT const std::list<std::string>& parameters() const;
68 //! Returns true if validator id is not empty
69 CONFIG_EXPORT bool isValid() const;
71 //! Set id of the filter
72 CONFIG_EXPORT void setValidatorId(const std::string& theId);
73 //! Set id of a feature to which the filter belongs to
74 CONFIG_EXPORT void setFeatureId(const std::string& theId);
75 //! Set id of an attribute to which the filter belongs to
76 CONFIG_EXPORT void setAttributeId(const std::string& theId);
77 //! Get filter parameters
78 CONFIG_EXPORT void setValidatorParameters(const std::list<std::string>& parameters);
81 #endif /* Config_ValidatorMessage_H_ */