/** * * Distributed under the UTC Heudiascy Pacpus License, Version 1.0. * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved. * * See the LICENSE file for more information or a copy at: * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt * */ #ifndef DEF_PACPUS_XMLCONFIGFILE_H #define DEF_PACPUS_XMLCONFIGFILE_H #include #include #include #include #include class QFile; namespace pacpus { /// XML config properties: /// list STRING(S) name(s) of plugin files to be loaded, separated by pipe symbol '|' /// e.g. dbt="libDbtPlyGps.so|libDbtPlyVision.so class PACPUSLIB_API XmlConfigFile { friend XmlComponentConfig::XmlComponentConfig(const QString&); friend class ComponentManager; public: static XmlConfigFile * create(); static void destroy(); QDomElement getComponent(QString name); QStringList getAllComponents(); QStringList getAllPlugins(); int loadFile(QString fileName); // not used void saveFile(QString fileName); // not used void addComponent(QDomElement component); // not used void delComponent(QDomElement component); protected: private: XmlConfigFile(); ~XmlConfigFile(); static XmlConfigFile * _xmlConfigFile; QDomElement createComponent(QString name); private: QDomDocument _document; QFile * _file; QMutex _mutex; int _numberOfComponents; }; } // namespace pacpus #endif // DEF_PACPUS_XMLCONFIGFILE_H