source: pacpusframework/trunk/include/Pacpus/kernel/XmlConfigFile.h@ 63

Last change on this file since 63 was 63, checked in by Marek Kurdej, 12 years ago

Documentation: file info.

File size: 2.4 KB
RevLine 
[62]1// This file is part of the PACPUS framework distributed under the
2// CECILL-C License, Version 1.0.
3//
[63]4/// @author Gerald Dherbomez <firstname.surname@utc.fr>
5/// @date January, 2006
[62]6/// @version $Id$
7/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
8/// @brief Brief description.
9///
[63]10/// Purpose: Classe permettant d'enregistrer un fichier de
11/// configuration XML
12/// Le fichier XML contient 2 sections :
13/// - parameters : contient les parametres de l'application
14/// - components : contient les composants
15/// les composants ne peuvent pas avoir de noeuds fils
16///
17/// @todo Creer une dtd qui permet de definir la liste des classes possibles
18/// que peuvent prendre les composants
[3]19
[31]20#ifndef DEF_PACPUS_XMLCONFIGFILE_H
21#define DEF_PACPUS_XMLCONFIGFILE_H
[3]22
[31]23#include <Pacpus/kernel/pacpus.h>
24#include <Pacpus/kernel/XmlComponentConfig.h>
[3]25
26#include <QDomElement>
27#include <QMutex>
28#include <QStringList>
29
30class QFile;
31
32namespace pacpus {
33
34/// XML config properties:
35/// list STRING(S) name(s) of plugin files to be loaded, separated by pipe symbol '|'
36/// e.g. dbt="libDbtPlyGps.so|libDbtPlyVision.so
37class PACPUSLIB_API XmlConfigFile
38{
39 friend XmlComponentConfig::XmlComponentConfig(const QString&);
40 friend class ComponentManager;
41
42public:
[53]43 /// @todo Documentation
[3]44 static XmlConfigFile * create();
[53]45 /// @todo Documentation
[3]46 static void destroy();
[53]47 /// @todo Documentation
[3]48 QDomElement getComponent(QString name);
[53]49 /// @returns a list of all names of components declared in the XML tree
[3]50 QStringList getAllComponents();
[53]51 /// @todo Documentation
[3]52 QStringList getAllPlugins();
[53]53 /// @todo Documentation
[3]54 int loadFile(QString fileName);
55
[53]56 /// @todo Documentation
57 /// not used
[3]58 void saveFile(QString fileName);
[53]59 /// @todo Documentation
60 /// not used
[3]61 void addComponent(QDomElement component);
[53]62 /// @todo Documentation
63 /// not used
[3]64 void delComponent(QDomElement component);
65
66protected:
67private:
68 XmlConfigFile();
69 ~XmlConfigFile();
70
71 static XmlConfigFile * _xmlConfigFile;
72
73 QDomElement createComponent(QString name);
74
75private:
76 QDomDocument _document;
77 QFile * _file;
78 QMutex _mutex;
79
80 int _numberOfComponents;
81};
82
83} // namespace pacpus
84
[31]85#endif // DEF_PACPUS_XMLCONFIGFILE_H
Note: See TracBrowser for help on using the repository browser.