Changeset 116 in pacpusframework for trunk/include/Pacpus/kernel/XmlComponentConfig.h
- Timestamp:
- 06/25/13 13:44:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/kernel/XmlComponentConfig.h
r91 r116 15 15 #define DEF_PACPUS_XMLCOMPONENTCONFIG_H 16 16 17 #include <Pacpus/kernel/ pacpus.h>17 #include <Pacpus/kernel/PacpusLibConfig.h> 18 18 19 19 #include <QDomElement> … … 23 23 class XmlConfigFile; 24 24 25 /** XmlComponentConfig 26 * @brief Defines the XML structure of a component. 27 */ 25 /// XmlComponentConfig 26 /// @brief Defines the XML structure of a component. 28 27 class PACPUSLIB_API XmlComponentConfig 29 28 { 30 29 friend class ComponentManager; 30 31 31 public: 32 /** Ctor of XmlComponentConfig. 33 * @param name Name of the ComponentFactory, by convention equal to class name. 34 */ 35 explicit XmlComponentConfig(const QString& name = QString::null); 32 /// Ctor of XmlComponentConfig. 33 /// @param name Name of the ComponentFactory, by convention equal to class name. 34 explicit XmlComponentConfig(const QString & name = QString::null); 36 35 37 / ** Dtor of XmlComponentConfig. */36 /// Dtor of XmlComponentConfig. 38 37 ~XmlComponentConfig(); 39 38 40 /** Add the property @em name to the XML and set its value to @em 0 if it does not exist. 41 * @param name Name of the property. 42 */ 39 /// Adds the property @em name to the XML and set its value to @em 0 if it does not exist. 40 /// @param name Name of the property. 43 41 void addProperty(const QString& name); 44 42 45 / ** Delete a propertyfrom the XML.46 * @return False if the property does not exist, false otherwise.47 */43 /// Deletes property @em name from the XML. 44 /// 45 /// @returns @b true if the property existed and was removed, @b false if the property did not exist or could not be removed. 48 46 int delProperty(const QString& name); 49 47 50 /** Get the value of a property. 51 * @param name Name of the property. 52 * @param defaultValue Value returned if the property does not exist. 53 * @return Value of the property, @em defaultValue otherwise. 54 */ 48 /// Gets the value of a property. 49 /// @param name Name of the property. 50 /// @param defaultValue Value returned if the property does not exist. 51 /// @return Value of the property, @em defaultValue otherwise. 55 52 QString getProperty(const QString& name, const QString& defaultValue = QString::null) const; 56 53 57 /** Get the value of a property as a boolean. 58 * @param name Name of the property. 59 * @param defaultValue Value returned if the property does not exist. 60 * @return Value of the property, @em defaultValue otherwise. 61 */ 54 /// Gets the value of a property as a boolean. 55 /// @param name Name of the property. 56 /// @param defaultValue Value returned if the property does not exist. 57 /// @returns Value of the property, @em defaultValue otherwise. 62 58 bool getBoolProperty(const QString& name, bool defaultValue = false) const; 63 59 64 /** Get the value of a property as an integer. 65 * @param name Name of the property. 66 * @param defaultValue Value returned if the property does not exist. 67 * @return Value of the property, @em defaultValue otherwise. 68 */ 60 /// Get the value of a property as an integer. 61 /// @param name Name of the property. 62 /// @param defaultValue Value returned if the property does not exist. 63 /// @return Value of the property, @em defaultValue otherwise. 69 64 int getIntProperty(const QString& name, int defaultValue = 0) const; 70 65 71 /** Get the value of a property as a double. 72 * @param name Name of the property. 73 * @param defaultValue Value returned if the property does not exist. 74 * @return Value of the property, @em defaultValue otherwise. 75 */ 66 /// Get the value of a property as a double. 67 /// @param name Name of the property. 68 /// @param defaultValue Value returned if the property does not exist. 69 /// @return Value of the property, @em defaultValue otherwise. 76 70 double getDoubleProperty(const QString& name, double defaultValue = 0.0) const; 77 71 78 /** Set the value of a property. 79 * @param name Name of the property. 80 * @param value Value to set. 81 */ 72 /// Set the value of a property. 73 /// @param name Name of the property. 74 /// @param value Value to set. 82 75 void setProperty(const QString& name, const QString& value); 83 76 84 /** Check if a property exists. 85 * @param name Name of the property. 86 * @return True if the property exists, false otherwise. 87 */ 77 /// Check if a property exists. 78 /// @param name Name of the property. 79 /// @return True if the property exists, false otherwise. 88 80 bool hasProperty(const QString& name) const; 89 81
Note:
See TracChangeset
for help on using the changeset viewer.