@@ -0,0 +1,28 | |||||
|
1 | #ifndef SCIQLOP_AMDASERVER_H | |||
|
2 | #define SCIQLOP_AMDASERVER_H | |||
|
3 | ||||
|
4 | #include <QLoggingCategory> | |||
|
5 | ||||
|
6 | #include <memory> | |||
|
7 | ||||
|
8 | Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaServer) | |||
|
9 | ||||
|
10 | /** | |||
|
11 | * @brief The AmdaServer class represents the server used to retrieve AMDA data (singleton). | |||
|
12 | * | |||
|
13 | * The server instance is initialized at compile time, as defined by the AMDA_SERVER value. | |||
|
14 | */ | |||
|
15 | class AmdaServer { | |||
|
16 | public: | |||
|
17 | /// @return the unique instance of the AMDA server | |||
|
18 | static AmdaServer &instance(); | |||
|
19 | ||||
|
20 | virtual ~AmdaServer() noexcept = default; | |||
|
21 | ||||
|
22 | /// @return the name of the server | |||
|
23 | virtual QString name() const = 0; | |||
|
24 | /// @return the url of the server (used to retrieve data) | |||
|
25 | virtual QString url() const = 0; | |||
|
26 | }; | |||
|
27 | ||||
|
28 | #endif // SCIQLOP_AMDASERVER_H |
@@ -0,0 +1,8 | |||||
|
1 | #include "AmdaServer.h" | |||
|
2 | ||||
|
3 | Q_LOGGING_CATEGORY(LOG_AmdaServer, "AmdaServer") | |||
|
4 | ||||
|
5 | AmdaServer &AmdaServer::instance() | |||
|
6 | { | |||
|
7 | /// @todo ALX | |||
|
8 | } |
@@ -11,7 +11,8 amdaplugin_sources = [ | |||||
11 | 'src/AmdaProvider.cpp', |
|
11 | 'src/AmdaProvider.cpp', | |
12 | 'src/AmdaResultParser.cpp', |
|
12 | 'src/AmdaResultParser.cpp', | |
13 | 'src/AmdaResultParserDefs.cpp', |
|
13 | 'src/AmdaResultParserDefs.cpp', | |
14 | 'src/AmdaResultParserHelper.cpp' |
|
14 | 'src/AmdaResultParserHelper.cpp', | |
|
15 | 'src/AmdaServer.cpp' | |||
15 | ] |
|
16 | ] | |
16 |
|
17 | |||
17 | amdaplugin_ui_files = [] |
|
18 | amdaplugin_ui_files = [] |
General Comments 0
You need to be logged in to leave comments.
Login now