Ignore:
Timestamp:
07/31/13 11:20:11 (11 years ago)
Author:
Marek Kurdej
Message:

Update: refactoring in XmlConfigFile.
Added: attributes 'prefix', 'postfix', 'extension' in <parameters>.
Example: <parameters prefix="" postfix="_d" extension="dll">

File:
1 edited

Legend:

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

    r89 r146  
    2727
    2828#include <QDomElement>
     29#include <QFile>
    2930#include <QMutex>
    3031#include <QStringList>
     
    4748    /// @todo Documentation
    4849    static void destroy();
     50
     51    /// @returns a list of all names of components declared in the XML tree
     52    QStringList getAllComponentsNames() const;
    4953    /// @todo Documentation
    50     QDomElement getComponent(QString name);
    51     /// @returns a list of all names of components declared in the XML tree
    52     QStringList getAllComponentsNames();
     54    QDomElement getComponent(QString name) const;
     55   
     56    // TODO: QStringList getAllConnectionsNames() const;
     57    QDomElement getConnection(QString connectionName) const;
     58
    5359    /// @todo Documentation
    54     QStringList getAllPlugins();
     60    QStringList getAllPluginsNames();
     61   
    5562    /// @todo Documentation
    5663    int loadFile(QString fileName);
    57 
    58     QDomNodeList getAllComponents();
    59 
    60     QDomNodeList getAllConnections();
    61 
    62     QDomElement getConnection(QString connectionName);
    6364
    6465    /// @todo Documentation
    6566    /// not used
    6667    void saveFile(QString fileName);
     68   
    6769    /// @todo Documentation
    6870    /// not used
    6971    void addComponent(QDomElement component);
     72   
    7073    /// @todo Documentation
     74    /// @deprecated Use removeComponent()
    7175    /// not used
    72     void delComponent(QDomElement component);
     76    PACPUS_DEPRECATED_MSG( void delComponent(QDomElement component), "use removeComponent()" );
     77    void removeComponent(QDomElement component);
    7378
    7479protected:
     80    QDomNodeList getAllComponents() const;
     81    QDomNodeList getAllConnections() const;
     82    QDomNodeList getAllPlugins();
     83
    7584private:
    7685    XmlConfigFile();
    7786    ~XmlConfigFile();
    7887
    79     static XmlConfigFile * _xmlConfigFile;
    80    
    8188    QDomElement createComponent(QString name);
    8289
     90    QString libraryExtension() const;
     91    QString libraryPrefix() const;
     92    QString libraryPostfix() const;
     93
    8394private:
    84     QDomDocument _document;
    85     QFile * _file;
    86     QMutex _mutex;
     95    static XmlConfigFile * m_xmlConfigFile;
     96   
     97    QDomDocument m_document;
     98    QFile m_file;
     99    QMutex m_mutex;
    87100
    88     int _numberOfComponents;
     101    QString m_libraryExtension;
     102    QString m_libraryPrefix;
     103    QString m_libraryPostfix;
     104   
     105    int m_numberOfComponents;
    89106};
    90107
Note: See TracChangeset for help on using the changeset viewer.