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

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

Update: license info.

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