Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Alexandre Leroux
- Wed, 05 Jul 2017 09:39:08
Show More
0
plugins/amda/include/AmdaParser.h
plugins/amda/include/AmdaParser.h
created
644
+23
0
@@
-0,0
+1,23
1
#ifndef SCIQLOP_AMDAPARSER_H
2
#define SCIQLOP_AMDAPARSER_H
3
4
#include "AmdaGlobal.h"
5
6
#include <QLoggingCategory>
7
8
#include <memory>
9
10
Q_DECLARE_LOGGING_CATEGORY ( LOG_AmdaParser )
11
12
class DataSourceItem ;
13
14
struct SCIQLOP_AMDA_EXPORT AmdaParser {
15
/**
16
* Creates a data source tree from a JSON file
17
* @param filePath the path of the JSON file to read
18
* @return the root of the created data source tree, nullptr if the file couldn't be parsed
19
*/
20
static std :: unique_ptr < DataSourceItem > readJson ( const QString & filePath ) noexcept ;
21
};
22
23
#endif // SCIQLOP_AMDAPARSER_H
0
plugins/amda/src/AmdaParser.cpp
plugins/amda/src/AmdaParser.cpp
created
644
+11
0
@@
-0,0
+1,11
1
#include "AmdaParser.h"
2
3
#include <DataSource/DataSourceItem.h>
4
5
Q_LOGGING_CATEGORY ( LOG_AmdaParser , "AmdaParser" )
6
7
std :: unique_ptr < DataSourceItem > AmdaParser :: readJson ( const QString & filePath ) noexcept
8
{
9
/// @todo ALX
10
return nullptr ;
11
}
0
plugins/amda/src/AmdaPlugin.cpp
plugins/amda/src/AmdaPlugin.cpp
+8
-1
@@
-1,6
+1,8
1
#include "AmdaPlugin.h"
1
#include "AmdaPlugin.h"
2
#include "AmdaParser.h"
2
3
3
#include <DataSource/DataSourceController.h>
4
#include <DataSource/DataSourceController.h>
5
#include <DataSource/DataSourceItem.h>
4
6
5
#include <SqpApplication.h>
7
#include <SqpApplication.h>
6
8
@@
-24,7
+26,12
void AmdaPlugin::initialize()
24
auto dataSourceUid = dataSourceController . registerDataSource ( DATA_SOURCE_NAME );
26
auto dataSourceUid = dataSourceController . registerDataSource ( DATA_SOURCE_NAME );
25
27
26
// Sets data source tree
28
// Sets data source tree
27
/// @todo ALX
29
if ( auto dataSourceItem = AmdaParser :: readJson ( JSON_FILE_PATH )) {
30
dataSourceController . setDataSourceItem ( dataSourceUid , std :: move ( dataSourceItem ));
31
}
32
else {
33
qCCritical ( LOG_AmdaPlugin ()) << tr ( "No data source item could be generated for AMDA" );
34
}
28
}
35
}
29
else {
36
else {
30
qCWarning ( LOG_AmdaPlugin ()) << tr ( "Can't access to SciQlop application" );
37
qCWarning ( LOG_AmdaPlugin ()) << tr ( "Can't access to SciQlop application" );
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages