- Timestamp:
- Jan 12, 2013, 9:21:15 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/kernel/XmlComponentConfig.h
r76 r78 1 // %pacpus:license{ 2 // This file is part of the PACPUS framework distributed under the 3 // CECILL-C License, Version 1.0. 4 // %pacpus:license} 5 /// @file 6 /// @author Gerald Dherbomez <firstname.surname@utc.fr> 7 /// @date January, 2006 8 /// @version $Id$ 9 /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved. 10 /// @brief Brief description. 11 /// 12 /// Purpose: definit la structure XML des paramètres de configuration 13 /// d'un composant 1 /********************************************************************* 2 // 3 // created: 2006/01/30 - 10:58 4 // 5 // filename: xmlcomponentconfig.h 6 // 7 // author: Gerald Dherbomez 8 // 9 // purpose: definit la structure XML des paramètres de configuration 10 // d'un composant 11 *********************************************************************/ 14 12 15 #ifndef DEF_PACPUS_XMLCOMPONENTCONFIG_H16 #define DEF_PACPUS_XMLCOMPONENTCONFIG_H13 #ifndef XMLCOMPONENTCONFIG_H 14 #define XMLCOMPONENTCONFIG_H 17 15 18 #include <Pacpus/kernel/pacpus.h>16 #include "pacpus.h" 19 17 20 18 #include <QDomElement> … … 61 59 * @return Value of the property, @em defaultValue otherwise. 62 60 */ 63 intgetBoolProperty(const QString& name, bool defaultValue = false) const;61 bool getBoolProperty(const QString& name, bool defaultValue = false) const; 64 62 65 63 /** Get the value of a property as an integer. … … 75 73 * @return Value of the property, @em defaultValue otherwise. 76 74 */ 77 intgetDoubleProperty(const QString& name, double defaultValue = 0.0) const;75 double getDoubleProperty(const QString& name, double defaultValue = 0.0) const; 78 76 79 77 /** Set the value of a property. … … 106 104 } // namespace pacpus 107 105 108 #endif // DEF_PACPUS_XMLCOMPONENTCONFIG_H106 #endif // XMLCOMPONENTCONFIG_H -
trunk/src/PacpusLib/XmlComponentConfig.cpp
r76 r78 1 // %pacpus:license{ 2 // This file is part of the PACPUS framework distributed under the 3 // CECILL-C License, Version 1.0. 4 // %pacpus:license} 5 /// @version $Id$ 1 /********************************************************************* 2 // created: 2006/01/30 3 // created: 2006/01/30 - 11:09 4 // filename: xmlcomponentconfig.cpp 5 // 6 // author: Gerald Dherbomez 7 // 8 // purpose: implementation de la classe XmlComponentConfig 9 *********************************************************************/ 6 10 7 #include <Pacpus/kernel/XmlComponentConfig.h> 8 #include <Pacpus/kernel/Log.h> 9 #include <Pacpus/kernel/XmlConfigFile.h> 11 #include "kernel/XmlComponentConfig.h" 10 12 11 using namespace pacpus; 13 #include "kernel/Log.h" 14 #include "kernel/XmlConfigFile.h" 15 16 namespace pacpus { 17 12 18 using namespace std; 13 19 … … 88 94 } 89 95 90 intXmlComponentConfig::getBoolProperty(const QString& name, bool defaultValue) const96 bool XmlComponentConfig::getBoolProperty(const QString& name, bool defaultValue) const 91 97 { 92 98 return hasProperty(name) ? getProperty(name) == "true" : defaultValue; … … 98 104 } 99 105 100 intXmlComponentConfig::getDoubleProperty(const QString& name, double defaultValue) const106 double XmlComponentConfig::getDoubleProperty(const QString& name, double defaultValue) const 101 107 { 102 108 return hasProperty(name) ? getProperty(name).toDouble() : defaultValue; … … 136 142 return getProperty(kPropertyComponentType.c_str()); 137 143 } 144 145 } // namespace pacpus
Note:
See TracChangeset
for help on using the changeset viewer.