Changeset 100 in pacpusframework


Ignore:
Timestamp:
Jun 2, 2013, 10:10:12 AM (11 years ago)
Author:
morasjul
Message:

beta 2.0 : fix some bug with xml reading function

Location:
branches/2.0-beta1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/include/Pacpus/kernel/inputOutputBase.h

    r96 r100  
    2929    void addConnection(ConnectionBase connection) { _connection.append(connection);}
    3030    bool removeConnection(ConnectionBase connection) { return _connection.removeOne(connection);}
     31
     32    bool hasConnection() { return _connection.size() > 0;}
    3133
    3234protected:
  • branches/2.0-beta1/src/PacpusLib/XmlComponentConfig.cpp

    r89 r100  
    4646    {
    4747        LOG_ERROR("cannot add component property:"
    48                   << " component '" << component_.tagName() << "'"
     48                  << " component '" << component_.attribute(kPropertyComponentName.c_str()) << "'"
    4949                  << " already contains property '" << name << "'"
    5050                  << " and its value is '" << component_.attribute(name) << "'"
     
    5656    component_.setAttribute(name, 0);
    5757    LOG_INFO("property '" << name << "'"
    58               << " was added to the component " << component_.tagName() << "'"
     58              << " was added to the component " << component_.attribute(kPropertyComponentName.c_str()) << "'"
    5959              << " and set to '" << component_.attribute(name) << "'"
    6060              );
     
    6666    {
    6767        LOG_WARN("cannot delete compoenent property '" << name << "'"
    68                  << " of component '" << component_.tagName() << "'"
     68                 << " of component '" << component_.attribute(kPropertyComponentName.c_str()) << "'"
    6969                 << ". Component does not contain this property."
    7070                 );
     
    7575    component_.removeAttribute(name);
    7676    LOG_INFO("property '" << name << "' "
    77       << " of component '" << component_.tagName() << "'"
     77      << " of component '" << component_.attribute(kPropertyComponentName.c_str()) << "'"
    7878      << " was deleted"
    7979      );
     
    8787    {
    8888        LOG_WARN("cannot retrieve component property '" << name << "'"
    89                  << " of component '" << component_.tagName() << "'"
     89                 << " of component '" << component_.attribute(kPropertyComponentName.c_str()) << "'"
    9090                 << ". Component does not contain this property."
    9191                 );
     
    116116    component_.setAttribute(name, value);
    117117    LOG_INFO("property " << name
    118              << " of the component " << component_.tagName()
     118             << " of the component " << component_.attribute(kPropertyComponentName.c_str())
    119119             << " was set to : " << value
    120120             );
     
    138138QString const XmlComponentConfig::getComponentName() const
    139139{
    140     //return component_.tagName();
     140    //return component_.attribute(kPropertyComponentName.c_str());
    141141    return getProperty(kPropertyComponentName.c_str());
    142142}
  • branches/2.0-beta1/src/PacpusLib/XmlConfigFile.cpp

    r89 r100  
    7474{
    7575    _mutex.lock();
    76 
     76// TODO change .tagName => .attribute(kPropertyComponentName.c_str())
    7777    if (_document.documentElement().namedItem(componentSection).namedItem(component.tagName()).isNull()) {
    7878        LOG_WARN("component " << component.tagName() << " exists already in the document");
Note: See TracChangeset for help on using the changeset viewer.