// This file is part of the PACPUS framework distributed under the // CECILL-C License, Version 1.0. // /// @author Firstname Surname /// @date Month, Year /// @version $Id$ /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved. /// @brief Brief description. /// /// Detailed description. #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: /// @todo Documentation static XmlConfigFile * create(); /// @todo Documentation static void destroy(); /// @todo Documentation QDomElement getComponent(QString name); /// @returns a list of all names of components declared in the XML tree QStringList getAllComponents(); /// @todo Documentation QStringList getAllPlugins(); /// @todo Documentation int loadFile(QString fileName); /// @todo Documentation /// not used void saveFile(QString fileName); /// @todo Documentation /// not used void addComponent(QDomElement component); /// @todo Documentation /// 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