SHAPER  9.15.0
Config_ValidatorMessage.h
1 // Copyright (C) 2014-2025 CEA, EDF
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef CONFIG_VALIDATORMESSAGE_H_
21 #define CONFIG_VALIDATORMESSAGE_H_
22 
23 #include <Events_Message.h>
24 #include <Config_def.h>
25 
26 #include <list>
27 #include <string>
28 
30 MAYBE_UNUSED static const char * EVENT_VALIDATOR_LOADED = "ValidatorLoaded";
31 
38 {
39  std::string myValidatorId;
40  std::string myFeatureId;
41  std::string myAttributeId;
42  std::list<std::string> myVaidatorParameters;
43 
44  public:
50  CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void* theParent = 0);
51  CONFIG_EXPORT virtual ~Config_ValidatorMessage();
52 
54  CONFIG_EXPORT const std::string& validatorId() const;
56  CONFIG_EXPORT const std::string& featureId() const;
58  CONFIG_EXPORT const std::string& attributeId() const;
60  CONFIG_EXPORT const std::list<std::string>& parameters() const;
62  CONFIG_EXPORT bool isValid() const;
63 
65  CONFIG_EXPORT void setValidatorId(const std::string& theId);
67  CONFIG_EXPORT void setFeatureId(const std::string& theId);
69  CONFIG_EXPORT void setAttributeId(const std::string& theId);
71  CONFIG_EXPORT void setValidatorParameters(const std::list<std::string>& parameters);
72 };
73 
74 #endif /* Config_ValidatorMessage_H_ */
Transmits info about created validator on "ValidatorLoaded" event.
Definition: Config_ValidatorMessage.h:38
CONFIG_EXPORT const std::string & validatorId() const
Get id of the filter.
Definition: Config_ValidatorMessage.cpp:34
CONFIG_EXPORT void setValidatorParameters(const std::list< std::string > &parameters)
Get filter parameters.
Definition: Config_ValidatorMessage.cpp:64
CONFIG_EXPORT void setFeatureId(const std::string &theId)
Set id of a feature to which the filter belongs to.
Definition: Config_ValidatorMessage.cpp:69
CONFIG_EXPORT void setAttributeId(const std::string &theId)
Set id of an attribute to which the filter belongs to.
Definition: Config_ValidatorMessage.cpp:74
CONFIG_EXPORT const std::string & attributeId() const
Get id of an attribute to which the filter belongs to.
Definition: Config_ValidatorMessage.cpp:44
CONFIG_EXPORT bool isValid() const
Returns true if validator id is not empty.
Definition: Config_ValidatorMessage.cpp:54
CONFIG_EXPORT const std::list< std::string > & parameters() const
Get filter parameters.
Definition: Config_ValidatorMessage.cpp:49
CONFIG_EXPORT void setValidatorId(const std::string &theId)
Set id of the filter.
Definition: Config_ValidatorMessage.cpp:59
CONFIG_EXPORT const std::string & featureId() const
Get id of a feature to which the filter belongs to.
Definition: Config_ValidatorMessage.cpp:39
CONFIG_EXPORT Config_ValidatorMessage(const Events_ID theId, const void *theParent=0)
Definition: Config_ValidatorMessage.cpp:22
Identifier of the event kind.
Definition: Events_Message.h:36
Message for communication between sender and listener of event.
Definition: Events_Message.h:65