Changeset 146 in pacpusframework for branches/2.0-beta1/include/Pacpus/kernel/XmlConfigFile.h
- Timestamp:
- 07/31/13 11:20:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0-beta1/include/Pacpus/kernel/XmlConfigFile.h
r89 r146 27 27 28 28 #include <QDomElement> 29 #include <QFile> 29 30 #include <QMutex> 30 31 #include <QStringList> … … 47 48 /// @todo Documentation 48 49 static void destroy(); 50 51 /// @returns a list of all names of components declared in the XML tree 52 QStringList getAllComponentsNames() const; 49 53 /// @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 53 59 /// @todo Documentation 54 QStringList getAllPlugins(); 60 QStringList getAllPluginsNames(); 61 55 62 /// @todo Documentation 56 63 int loadFile(QString fileName); 57 58 QDomNodeList getAllComponents();59 60 QDomNodeList getAllConnections();61 62 QDomElement getConnection(QString connectionName);63 64 64 65 /// @todo Documentation 65 66 /// not used 66 67 void saveFile(QString fileName); 68 67 69 /// @todo Documentation 68 70 /// not used 69 71 void addComponent(QDomElement component); 72 70 73 /// @todo Documentation 74 /// @deprecated Use removeComponent() 71 75 /// not used 72 void delComponent(QDomElement component); 76 PACPUS_DEPRECATED_MSG( void delComponent(QDomElement component), "use removeComponent()" ); 77 void removeComponent(QDomElement component); 73 78 74 79 protected: 80 QDomNodeList getAllComponents() const; 81 QDomNodeList getAllConnections() const; 82 QDomNodeList getAllPlugins(); 83 75 84 private: 76 85 XmlConfigFile(); 77 86 ~XmlConfigFile(); 78 87 79 static XmlConfigFile * _xmlConfigFile;80 81 88 QDomElement createComponent(QString name); 82 89 90 QString libraryExtension() const; 91 QString libraryPrefix() const; 92 QString libraryPostfix() const; 93 83 94 private: 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; 87 100 88 int _numberOfComponents; 101 QString m_libraryExtension; 102 QString m_libraryPrefix; 103 QString m_libraryPostfix; 104 105 int m_numberOfComponents; 89 106 }; 90 107
Note:
See TracChangeset
for help on using the changeset viewer.