Salome HOME
FIx for issue #360 : make switching on/off checking of transactions in Session -...
[modules/shaper.git] / src / Config / Config_WidgetAPI.h
index 02131a2debd86ef7c9d8867c873676be6b6820fe..2c2cd9c7165015879a397dc73dceac73e74aa717 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 /*
  * Config_WidgetAPI.h
  *
@@ -25,6 +27,10 @@ typedef xmlDoc *xmlDocPtr;
 struct _xmlDoc;
 //<<
 
+/*!
+ * \class Config_WidgetAPI
+ * \brief Provides low-level API for WidgetFactory for reading xml definitions of widgets
+ */
 class CONFIG_EXPORT Config_WidgetAPI
 {
  public:
@@ -41,6 +47,14 @@ class CONFIG_EXPORT Config_WidgetAPI
 
   std::string getProperty(const char* thePropName) const;
 
+  /// Checks if the XML representation of widget has given attribute,
+  /// if yes - returns it's bool value, if no, or if the value can not
+  /// be converted to bool - returns theDefault.
+  /// \param theAttributeName attribute to check
+  /// \param theDefault default value on bad data
+  /// \return the boolean result
+  bool getBooleanAttribute(const char* theAttributeName, bool theDefault) const;
+
   bool isComputedDefault() const;
 
  protected: