Changeset 78 in pacpusframework


Ignore:
Timestamp:
Jan 12, 2013, 9:21:15 PM (12 years ago)
Author:
sgosseli
Message:

Major: fix return types in XmlComponentConfig.

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*********************************************************************/
    1412
    15 #ifndef DEF_PACPUS_XMLCOMPONENTCONFIG_H
    16 #define DEF_PACPUS_XMLCOMPONENTCONFIG_H
     13#ifndef XMLCOMPONENTCONFIG_H
     14#define XMLCOMPONENTCONFIG_H
    1715
    18 #include <Pacpus/kernel/pacpus.h>
     16#include "pacpus.h"
    1917
    2018#include <QDomElement>
     
    6159     * @return Value of the property, @em defaultValue otherwise.
    6260     */
    63     int getBoolProperty(const QString& name, bool defaultValue = false) const;
     61    bool getBoolProperty(const QString& name, bool defaultValue = false) const;
    6462
    6563    /** Get the value of a property as an integer.
     
    7573     * @return Value of the property, @em defaultValue otherwise.
    7674     */
    77     int getDoubleProperty(const QString& name, double defaultValue = 0.0) const;
     75    double getDoubleProperty(const QString& name, double defaultValue = 0.0) const;
    7876
    7977    /** Set the value of a property.
     
    106104} // namespace pacpus
    107105
    108 #endif // DEF_PACPUS_XMLCOMPONENTCONFIG_H
     106#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*********************************************************************/
    610
    7 #include <Pacpus/kernel/XmlComponentConfig.h>
    8 #include <Pacpus/kernel/Log.h>
    9 #include <Pacpus/kernel/XmlConfigFile.h>
     11#include "kernel/XmlComponentConfig.h"
    1012
    11 using namespace pacpus;
     13#include "kernel/Log.h"
     14#include "kernel/XmlConfigFile.h"
     15
     16namespace pacpus {
     17
    1218using namespace std;
    1319
     
    8894}
    8995
    90 int XmlComponentConfig::getBoolProperty(const QString& name, bool defaultValue) const
     96bool XmlComponentConfig::getBoolProperty(const QString& name, bool defaultValue) const
    9197{
    9298  return hasProperty(name) ? getProperty(name) == "true" : defaultValue;
     
    98104}
    99105
    100 int XmlComponentConfig::getDoubleProperty(const QString& name, double defaultValue) const
     106double XmlComponentConfig::getDoubleProperty(const QString& name, double defaultValue) const
    101107{
    102108  return hasProperty(name) ? getProperty(name).toDouble() : defaultValue;
     
    136142    return getProperty(kPropertyComponentType.c_str());
    137143}
     144
     145} // namespace pacpus
Note: See TracChangeset for help on using the changeset viewer.