@@ -0,0 +1,5 | |||||
|
1 | AmdaResultParser\.h:\d+:.*IPSIS_S01.* | |||
|
2 | AmdaResultParserHelper\.h:\d+:.*IPSIS_S01.* | |||
|
3 | ||||
|
4 | AmdaProvider\.cpp:\d+:.*IPSIS_S04_VARIABLE.*found: QStringLiteral | |||
|
5 | AmdaResultParserHelper\.cpp:\d+:.*IPSIS_S04_VARIABLE.*found: QT_VERSION_CHECK No newline at end of file |
@@ -1,167 +1,167 | |||||
1 | ## amda - CMakeLists.txt |
|
1 | ## amda - CMakeLists.txt | |
2 | STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX) |
|
2 | STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX) | |
3 | SET(SQPAMDA_LIBRARY_NAME "${LIBRARY_PREFFIX}_amda${DEBUG_SUFFIX}") |
|
3 | SET(SQPAMDA_LIBRARY_NAME "${LIBRARY_PREFFIX}_amda${DEBUG_SUFFIX}") | |
4 | SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") |
|
4 | SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") | |
5 | SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") |
|
5 | SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") | |
6 | SET(RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") |
|
6 | SET(RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") | |
7 | SET(TESTS_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests-resources") |
|
7 | SET(TESTS_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests-resources") | |
8 |
|
8 | |||
9 | # Include amda directory |
|
9 | # Include amda directory | |
10 | INCLUDE_DIRECTORIES(${INCLUDES_DIR}) |
|
10 | INCLUDE_DIRECTORIES(${INCLUDES_DIR}) | |
11 | INCLUDE_DIRECTORIES(${RESOURCES_DIR}) |
|
11 | INCLUDE_DIRECTORIES(${RESOURCES_DIR}) | |
12 |
|
12 | |||
13 | # |
|
13 | # | |
14 | # Find Qt modules |
|
14 | # Find Qt modules | |
15 | # |
|
15 | # | |
16 | SCIQLOP_FIND_QT(Core Widgets Network) |
|
16 | SCIQLOP_FIND_QT(Core Widgets Network) | |
17 |
|
17 | |||
18 | # |
|
18 | # | |
19 | # Find dependent libraries |
|
19 | # Find dependent libraries | |
20 | # ======================== |
|
20 | # ======================== | |
21 |
|
21 | |||
22 | # sciqlop plugin |
|
22 | # sciqlop plugin | |
23 | find_package(sciqlop-plugin) |
|
23 | find_package(sciqlop-plugin) | |
24 | INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR}) |
|
24 | INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR}) | |
25 |
|
25 | |||
26 | # sciqlop core |
|
26 | # sciqlop core | |
27 | find_package(sciqlop-core) |
|
27 | find_package(sciqlop-core) | |
28 | INCLUDE_DIRECTORIES(${SCIQLOP-CORE_INCLUDE_DIR}) |
|
28 | INCLUDE_DIRECTORIES(${SCIQLOP-CORE_INCLUDE_DIR}) | |
29 | list(APPEND LIBRARIES ${SCIQLOP-CORE_LIBRARIES}) |
|
29 | list(APPEND LIBRARIES ${SCIQLOP-CORE_LIBRARIES}) | |
30 |
|
30 | |||
31 | # sciqlop gui |
|
31 | # sciqlop gui | |
32 | find_package(sciqlop-gui) |
|
32 | find_package(sciqlop-gui) | |
33 | INCLUDE_DIRECTORIES(${SCIQLOP-GUI_INCLUDE_DIR}) |
|
33 | INCLUDE_DIRECTORIES(${SCIQLOP-GUI_INCLUDE_DIR}) | |
34 | list(APPEND LIBRARIES ${SCIQLOP-GUI_LIBRARIES}) |
|
34 | list(APPEND LIBRARIES ${SCIQLOP-GUI_LIBRARIES}) | |
35 |
|
35 | |||
36 | # Description file |
|
36 | # Description file | |
37 | FILE (GLOB_RECURSE PLUGIN_FILE ${RESOURCES_DIR}/amda.json) |
|
37 | FILE (GLOB_RECURSE PLUGIN_FILE ${RESOURCES_DIR}/amda.json) | |
38 |
|
38 | |||
39 | # Resources files |
|
39 | # Resources files | |
40 | FILE (GLOB_RECURSE PROJECT_RESOURCES ${RESOURCES_DIR}/*.qrc) |
|
40 | FILE (GLOB_RECURSE PROJECT_RESOURCES ${RESOURCES_DIR}/*.qrc) | |
41 |
|
41 | |||
42 | # |
|
42 | # | |
43 | # Compile the library |
|
43 | # Compile the library | |
44 | # |
|
44 | # | |
45 |
|
45 | |||
46 | ADD_DEFINITIONS(-DAMDA_LIB) |
|
46 | ADD_DEFINITIONS(-DAMDA_LIB) | |
47 |
|
47 | |||
48 | FILE (GLOB_RECURSE MODULE_SOURCES |
|
48 | FILE (GLOB_RECURSE MODULE_SOURCES | |
49 | ${INCLUDES_DIR}/*.h |
|
49 | ${INCLUDES_DIR}/*.h | |
50 | ${SOURCES_DIR}/*.c |
|
50 | ${SOURCES_DIR}/*.c | |
51 | ${SOURCES_DIR}/*.cpp |
|
51 | ${SOURCES_DIR}/*.cpp | |
52 | ${SOURCES_DIR}/*.h |
|
52 | ${SOURCES_DIR}/*.h | |
53 | ${PLUGIN_FILE}) |
|
53 | ${PLUGIN_FILE}) | |
54 |
|
54 | |||
55 | QT5_ADD_RESOURCES(RCC_AMDA |
|
55 | QT5_ADD_RESOURCES(RCC_AMDA | |
56 | ${PROJECT_RESOURCES} |
|
56 | ${PROJECT_RESOURCES} | |
57 | ) |
|
57 | ) | |
58 |
|
58 | |||
59 | ADD_LIBRARY(${SQPAMDA_LIBRARY_NAME} ${MODULE_SOURCES} ${RCC_AMDA}) |
|
59 | ADD_LIBRARY(${SQPAMDA_LIBRARY_NAME} ${MODULE_SOURCES} ${RCC_AMDA}) | |
60 | set_property(TARGET ${SQPAMDA_LIBRARY_NAME} PROPERTY CXX_STANDARD 14) |
|
60 | set_property(TARGET ${SQPAMDA_LIBRARY_NAME} PROPERTY CXX_STANDARD 14) | |
61 | set_property(TARGET ${SQPAMDA_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) |
|
61 | set_property(TARGET ${SQPAMDA_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) | |
62 |
|
62 | |||
63 | INSTALL(TARGETS ${SQPAMDA_LIBRARY_NAME} |
|
63 | INSTALL(TARGETS ${SQPAMDA_LIBRARY_NAME} | |
64 | RUNTIME DESTINATION ${INSTALL_BINARY_DIR} |
|
64 | RUNTIME DESTINATION ${INSTALL_BINARY_DIR} | |
65 | LIBRARY DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR} |
|
65 | LIBRARY DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR} | |
66 | ARCHIVE DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR} |
|
66 | ARCHIVE DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR} | |
67 | ) |
|
67 | ) | |
68 |
|
68 | |||
69 |
|
69 | |||
70 | TARGET_LINK_LIBRARIES(${SQPAMDA_LIBRARY_NAME} ${LIBRARIES}) |
|
70 | TARGET_LINK_LIBRARIES(${SQPAMDA_LIBRARY_NAME} ${LIBRARIES}) | |
71 | qt5_use_modules(${SQPAMDA_LIBRARY_NAME} Core Widgets Network) |
|
71 | qt5_use_modules(${SQPAMDA_LIBRARY_NAME} Core Widgets Network) | |
72 |
|
72 | |||
73 | add_dependencies(${SQPAMDA_LIBRARY_NAME} ${SQPPLUGIN_LIBRARY_NAME} ${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME}) |
|
73 | add_dependencies(${SQPAMDA_LIBRARY_NAME} ${SQPPLUGIN_LIBRARY_NAME} ${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME}) | |
74 |
|
74 | |||
75 | # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html |
|
75 | # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html | |
76 | # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order. |
|
76 | # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order. | |
77 | # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets |
|
77 | # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets | |
78 | IF(BUILD_SHARED_LIBS) |
|
78 | IF(BUILD_SHARED_LIBS) | |
79 | SET_TARGET_PROPERTIES(${SQPAMDA_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT") |
|
79 | SET_TARGET_PROPERTIES(${SQPAMDA_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT") | |
80 | ELSE() |
|
80 | ELSE() | |
81 | TARGET_COMPILE_DEFINITIONS(${SQPAMDA_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES") |
|
81 | TARGET_COMPILE_DEFINITIONS(${SQPAMDA_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES") | |
82 | ENDIF() |
|
82 | ENDIF() | |
83 |
|
83 | |||
84 | # Set the variable to parent scope so that the other projects can copy the |
|
84 | # Set the variable to parent scope so that the other projects can copy the | |
85 | # dependent shared libraries |
|
85 | # dependent shared libraries | |
86 | SCIQLOP_SET_TO_PARENT_SCOPE(SQPAMDA_LIBRARY_NAME) |
|
86 | SCIQLOP_SET_TO_PARENT_SCOPE(SQPAMDA_LIBRARY_NAME) | |
87 |
|
87 | |||
88 | # Copy extern shared libraries to the lib folder |
|
88 | # Copy extern shared libraries to the lib folder | |
89 | SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPAMDA_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES}) |
|
89 | SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPAMDA_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES}) | |
90 |
|
90 | |||
91 | # Add the files to the list of files to be analyzed |
|
91 | # Add the files to the list of files to be analyzed | |
92 | LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES}) |
|
92 | LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES}) | |
93 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES) |
|
93 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES) | |
94 | # Vera++ exclusion files |
|
94 | # Vera++ exclusion files | |
95 |
|
|
95 | LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt) | |
96 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES) |
|
96 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES) | |
97 |
|
97 | |||
98 | # |
|
98 | # | |
99 | # Compile the tests |
|
99 | # Compile the tests | |
100 | # |
|
100 | # | |
101 | IF(BUILD_TESTS) |
|
101 | IF(BUILD_TESTS) | |
102 | INCLUDE_DIRECTORIES(${SOURCES_DIR}) |
|
102 | INCLUDE_DIRECTORIES(${SOURCES_DIR}) | |
103 | FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp) |
|
103 | FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp) | |
104 | FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h) |
|
104 | FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h) | |
105 | SET( TEST_LIBRARIES ${SQPAMDA_LIBRARY_NAME}) |
|
105 | SET( TEST_LIBRARIES ${SQPAMDA_LIBRARY_NAME}) | |
106 |
|
106 | |||
107 | FOREACH( testFile ${TESTS_SOURCES} ) |
|
107 | FOREACH( testFile ${TESTS_SOURCES} ) | |
108 | GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY ) |
|
108 | GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY ) | |
109 | GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE ) |
|
109 | GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE ) | |
110 |
|
110 | |||
111 | # Add to the list of sources files all the sources in the same |
|
111 | # Add to the list of sources files all the sources in the same | |
112 | # directory that aren't another test |
|
112 | # directory that aren't another test | |
113 | FILE (GLOB currentTestSources |
|
113 | FILE (GLOB currentTestSources | |
114 | ${testDirectory}/*.c |
|
114 | ${testDirectory}/*.c | |
115 | ${testDirectory}/*.cpp |
|
115 | ${testDirectory}/*.cpp | |
116 | ${testDirectory}/*.h) |
|
116 | ${testDirectory}/*.h) | |
117 | LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES}) |
|
117 | LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES}) | |
118 | # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS}) |
|
118 | # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS}) | |
119 |
|
119 | |||
120 | ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources}) |
|
120 | ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources}) | |
121 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14) |
|
121 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14) | |
122 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON) |
|
122 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON) | |
123 | TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} ) |
|
123 | TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} ) | |
124 | qt5_use_modules(${testName} Test) |
|
124 | qt5_use_modules(${testName} Test) | |
125 |
|
125 | |||
126 | ADD_TEST( NAME ${testName} COMMAND ${testName} ) |
|
126 | ADD_TEST( NAME ${testName} COMMAND ${testName} ) | |
127 |
|
127 | |||
128 | SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES}) |
|
128 | SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES}) | |
129 | ENDFOREACH( testFile ) |
|
129 | ENDFOREACH( testFile ) | |
130 |
|
130 | |||
131 | LIST(APPEND testFilesToFormat ${TESTS_SOURCES}) |
|
131 | LIST(APPEND testFilesToFormat ${TESTS_SOURCES}) | |
132 | LIST(APPEND testFilesToFormat ${TESTS_HEADERS}) |
|
132 | LIST(APPEND testFilesToFormat ${TESTS_HEADERS}) | |
133 | LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat}) |
|
133 | LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat}) | |
134 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) |
|
134 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) | |
135 |
|
135 | |||
136 | ADD_DEFINITIONS(-DAMDA_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}") |
|
136 | ADD_DEFINITIONS(-DAMDA_TESTS_RESOURCES_DIR="${TESTS_RESOURCES_DIR}") | |
137 | ENDIF(BUILD_TESTS) |
|
137 | ENDIF(BUILD_TESTS) | |
138 |
|
138 | |||
139 | # |
|
139 | # | |
140 | # Set the files that must be formatted by clang-format. |
|
140 | # Set the files that must be formatted by clang-format. | |
141 | # |
|
141 | # | |
142 | LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES}) |
|
142 | LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES}) | |
143 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) |
|
143 | SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES) | |
144 |
|
144 | |||
145 | # |
|
145 | # | |
146 | # Set the directories that doxygen must browse to generate the |
|
146 | # Set the directories that doxygen must browse to generate the | |
147 | # documentation. |
|
147 | # documentation. | |
148 | # |
|
148 | # | |
149 | # Source directories: |
|
149 | # Source directories: | |
150 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs") |
|
150 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs") | |
151 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") |
|
151 | LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") | |
152 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS) |
|
152 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS) | |
153 | # Source directories to exclude from the documentation generation |
|
153 | # Source directories to exclude from the documentation generation | |
154 | #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*") |
|
154 | #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*") | |
155 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS) |
|
155 | SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS) | |
156 |
|
156 | |||
157 | # |
|
157 | # | |
158 | # Set the directories with the sources to analyze and propagate the |
|
158 | # Set the directories with the sources to analyze and propagate the | |
159 | # modification to the parent scope |
|
159 | # modification to the parent scope | |
160 | # |
|
160 | # | |
161 | # Source directories to analyze: |
|
161 | # Source directories to analyze: | |
162 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") |
|
162 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") | |
163 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests") |
|
163 | LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests") | |
164 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS) |
|
164 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS) | |
165 | # Source directories to exclude from the analysis |
|
165 | # Source directories to exclude from the analysis | |
166 | #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir") |
|
166 | #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir") | |
167 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS) |
|
167 | SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS) |
@@ -1,29 +1,29 | |||||
1 | #ifndef SCIQLOP_AMDAPLUGIN_H |
|
1 | #ifndef SCIQLOP_AMDAPLUGIN_H | |
2 | #define SCIQLOP_AMDAPLUGIN_H |
|
2 | #define SCIQLOP_AMDAPLUGIN_H | |
3 |
|
3 | |||
4 | #include "AmdaGlobal.h" |
|
4 | #include "AmdaGlobal.h" | |
5 |
|
5 | |||
6 | #include <Plugin/IPlugin.h> |
|
6 | #include <Plugin/IPlugin.h> | |
7 |
|
7 | |||
8 | #include <QLoggingCategory> |
|
8 | #include <QLoggingCategory> | |
9 |
|
9 | |||
10 | #include <memory> |
|
10 | #include <memory> | |
11 |
|
11 | |||
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaPlugin) |
|
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaPlugin) | |
13 |
|
13 | |||
14 | #ifndef PLUGIN_JSON_FILE_PATH |
|
14 | #ifndef SCIQLOP_PLUGIN_JSON_FILE_PATH | |
15 | #define PLUGIN_JSON_FILE_PATH "amda.json" |
|
15 | #define SCIQLOP_PLUGIN_JSON_FILE_PATH "amda.json" | |
16 | #endif |
|
16 | #endif | |
17 |
|
17 | |||
18 | class DataSourceItem; |
|
18 | class DataSourceItem; | |
19 |
|
19 | |||
20 | class SCIQLOP_AMDA_EXPORT AmdaPlugin : public QObject, public IPlugin { |
|
20 | class SCIQLOP_AMDA_EXPORT AmdaPlugin : public QObject, public IPlugin { | |
21 | Q_OBJECT |
|
21 | Q_OBJECT | |
22 | Q_INTERFACES(IPlugin) |
|
22 | Q_INTERFACES(IPlugin) | |
23 | Q_PLUGIN_METADATA(IID "sciqlop.plugin.IPlugin" FILE PLUGIN_JSON_FILE_PATH) |
|
23 | Q_PLUGIN_METADATA(IID "sciqlop.plugin.IPlugin" FILE SCIQLOP_PLUGIN_JSON_FILE_PATH) | |
24 | public: |
|
24 | public: | |
25 | /// @sa IPlugin::initialize() |
|
25 | /// @sa IPlugin::initialize() | |
26 | void initialize() override; |
|
26 | void initialize() override; | |
27 | }; |
|
27 | }; | |
28 |
|
28 | |||
29 | #endif // SCIQLOP_AMDAPLUGIN_H |
|
29 | #endif // SCIQLOP_AMDAPLUGIN_H |
@@ -1,44 +1,44 | |||||
1 | #ifndef SCIQLOP_AMDAPROVIDER_H |
|
1 | #ifndef SCIQLOP_AMDAPROVIDER_H | |
2 | #define SCIQLOP_AMDAPROVIDER_H |
|
2 | #define SCIQLOP_AMDAPROVIDER_H | |
3 |
|
3 | |||
4 | #include "AmdaGlobal.h" |
|
4 | #include "AmdaGlobal.h" | |
5 |
|
5 | |||
6 | #include <Data/IDataProvider.h> |
|
6 | #include <Data/IDataProvider.h> | |
7 |
|
7 | |||
8 | #include <QLoggingCategory> |
|
8 | #include <QLoggingCategory> | |
9 |
|
9 | |||
10 | #include <map> |
|
10 | #include <map> | |
11 |
|
11 | |||
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaProvider) |
|
12 | Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaProvider) | |
13 |
|
13 | |||
14 | class QNetworkReply; |
|
14 | class QNetworkReply; | |
15 | class QNetworkRequest; |
|
15 | class QNetworkRequest; | |
16 |
|
16 | |||
17 | /** |
|
17 | /** | |
18 | * @brief The AmdaProvider class is an example of how a data provider can generate data |
|
18 | * @brief The AmdaProvider class is an example of how a data provider can generate data | |
19 | */ |
|
19 | */ | |
20 | class SCIQLOP_AMDA_EXPORT AmdaProvider : public IDataProvider { |
|
20 | class SCIQLOP_AMDA_EXPORT AmdaProvider : public IDataProvider { | |
21 | Q_OBJECT |
|
21 | Q_OBJECT | |
22 | public: |
|
22 | public: | |
23 | explicit AmdaProvider(); |
|
23 | explicit AmdaProvider(); | |
24 | std::shared_ptr<IDataProvider> clone() const override; |
|
24 | std::shared_ptr<IDataProvider> clone() const override; | |
25 |
|
25 | |||
26 | void requestDataLoading(QUuid acqIdentifier, const DataProviderParameters ¶meters) override; |
|
26 | void requestDataLoading(QUuid acqIdentifier, const DataProviderParameters ¶meters) override; | |
27 |
|
27 | |||
28 | void requestDataAborting(QUuid acqIdentifier) override; |
|
28 | void requestDataAborting(QUuid acqIdentifier) override; | |
29 |
|
29 | |||
30 | private slots: |
|
|||
31 | void onReplyDownloadProgress(QUuid acqIdentifier, |
|
|||
32 | std::shared_ptr<QNetworkRequest> networkRequest, double progress); |
|
|||
33 |
|
||||
34 | private: |
|
30 | private: | |
35 | void retrieveData(QUuid token, const SqpRange &dateTime, const QVariantHash &data); |
|
31 | void retrieveData(QUuid token, const SqpRange &dateTime, const QVariantHash &data); | |
36 |
|
32 | |||
37 | void updateRequestProgress(QUuid acqIdentifier, std::shared_ptr<QNetworkRequest> request, |
|
33 | void updateRequestProgress(QUuid acqIdentifier, std::shared_ptr<QNetworkRequest> request, | |
38 | double progress); |
|
34 | double progress); | |
39 |
|
35 | |||
40 | std::map<QUuid, std::map<std::shared_ptr<QNetworkRequest>, double> > |
|
36 | std::map<QUuid, std::map<std::shared_ptr<QNetworkRequest>, double> > | |
41 | m_AcqIdToRequestProgressMap; |
|
37 | m_AcqIdToRequestProgressMap; | |
|
38 | ||||
|
39 | private slots: | |||
|
40 | void onReplyDownloadProgress(QUuid acqIdentifier, | |||
|
41 | std::shared_ptr<QNetworkRequest> networkRequest, double progress); | |||
42 | }; |
|
42 | }; | |
43 |
|
43 | |||
44 | #endif // SCIQLOP_AMDAPROVIDER_H |
|
44 | #endif // SCIQLOP_AMDAPROVIDER_H |
@@ -1,76 +1,76 | |||||
1 |
|
1 | |||
2 | amdaplugin_moc_headers = [ |
|
2 | amdaplugin_moc_headers = [ | |
3 | 'include/AmdaPlugin.h', |
|
3 | 'include/AmdaPlugin.h', | |
4 | 'include/AmdaProvider.h' |
|
4 | 'include/AmdaProvider.h' | |
5 | ] |
|
5 | ] | |
6 |
|
6 | |||
7 | amdaplugin_sources = [ |
|
7 | amdaplugin_sources = [ | |
8 | 'src/AmdaDefs.cpp', |
|
8 | 'src/AmdaDefs.cpp', | |
9 | 'src/AmdaParser.cpp', |
|
9 | 'src/AmdaParser.cpp', | |
10 | 'src/AmdaPlugin.cpp', |
|
10 | 'src/AmdaPlugin.cpp', | |
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 | 'src/AmdaServer.cpp' | |
16 | ] |
|
16 | ] | |
17 |
|
17 | |||
18 | amdaplugin_ui_files = [] |
|
18 | amdaplugin_ui_files = [] | |
19 | amdaplugin_resources_files = [ |
|
19 | amdaplugin_resources_files = [ | |
20 | 'resources/amdaresources.qrc' |
|
20 | 'resources/amdaresources.qrc' | |
21 | ] |
|
21 | ] | |
22 |
|
22 | |||
23 | amdaplugin_inc = include_directories(['include', '../../plugin/include']) |
|
23 | amdaplugin_inc = include_directories(['include', '../../plugin/include']) | |
24 |
|
24 | |||
25 | moc_gen = generator(moc, |
|
25 | moc_gen = generator(moc, | |
26 | output : 'moc_@BASENAME@.cpp', |
|
26 | output : 'moc_@BASENAME@.cpp', | |
27 | arguments : ['@INPUT@', |
|
27 | arguments : ['@INPUT@', | |
28 | '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', |
|
28 | '-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', | |
29 | '-I', meson.current_source_dir()+'/include', |
|
29 | '-I', meson.current_source_dir()+'/include', | |
30 | '-I', meson.current_source_dir()+'/../../plugin/include', |
|
30 | '-I', meson.current_source_dir()+'/../../plugin/include', | |
31 | '-o', '@OUTPUT@']) |
|
31 | '-o', '@OUTPUT@']) | |
32 |
|
32 | |||
33 | rcc_gen = generator(rcc, |
|
33 | rcc_gen = generator(rcc, | |
34 | output : 'qrc_@BASENAME@.cpp', |
|
34 | output : 'qrc_@BASENAME@.cpp', | |
35 | arguments : ['--name=@BASENAME@"', |
|
35 | arguments : ['--name=@BASENAME@"', | |
36 | '--output', |
|
36 | '--output', | |
37 | '@OUTPUT@', |
|
37 | '@OUTPUT@', | |
38 | '@INPUT@']) |
|
38 | '@INPUT@']) | |
39 |
|
39 | |||
40 | amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) |
|
40 | amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) | |
41 |
|
41 | |||
42 | amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) |
|
42 | amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) | |
43 |
|
43 | |||
44 | #amdaplugin_rcc_plugin_files = qt5.preprocess( |
|
44 | #amdaplugin_rcc_plugin_files = qt5.preprocess( | |
45 | # qresources : amdaplugin_resources_files) |
|
45 | # qresources : amdaplugin_resources_files) | |
46 |
|
46 | |||
47 | amdaplugin_moc_files = qt5.preprocess( |
|
47 | amdaplugin_moc_files = qt5.preprocess( | |
48 | ui_files : amdaplugin_ui_files) |
|
48 | ui_files : amdaplugin_ui_files) | |
49 |
|
49 | |||
50 | sciqlop_amdaplugin = library('amdaplugin', |
|
50 | sciqlop_amdaplugin = library('amdaplugin', | |
51 | amdaplugin_sources, |
|
51 | amdaplugin_sources, | |
52 | amdaplugin_moc_files, |
|
52 | amdaplugin_moc_files, | |
53 | amdaplugin_rcc_plugin_files, |
|
53 | amdaplugin_rcc_plugin_files, | |
54 | amdaplugin_moc_plugin_files, |
|
54 | amdaplugin_moc_plugin_files, | |
55 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], |
|
55 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], | |
56 | include_directories : [amdaplugin_inc], |
|
56 | include_directories : [amdaplugin_inc], | |
57 | dependencies : [sciqlop_core, sciqlop_gui], |
|
57 | dependencies : [sciqlop_core, sciqlop_gui], | |
58 | install : true |
|
58 | install : true | |
59 | ) |
|
59 | ) | |
60 |
|
60 | |||
61 |
|
61 | |||
62 | tests = [ |
|
62 | tests = [ | |
63 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], |
|
63 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], | |
64 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], |
|
64 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], | |
65 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'] |
|
65 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'] | |
66 | ] |
|
66 | ] | |
67 |
|
67 | |||
68 | foreach unit_test : tests |
|
68 | foreach unit_test : tests | |
69 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) |
|
69 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) | |
70 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, |
|
70 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, | |
71 | link_with : [sciqlop_amdaplugin], |
|
71 | link_with : [sciqlop_amdaplugin], | |
72 | include_directories : [amdaplugin_inc], |
|
72 | include_directories : [amdaplugin_inc], | |
73 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], |
|
73 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], | |
74 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) |
|
74 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) | |
75 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) |
|
75 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) | |
76 | endforeach |
|
76 | endforeach |
General Comments 0
You need to be logged in to leave comments.
Login now