-
Notifications
You must be signed in to change notification settings - Fork 0
/
RteKernelSlim.h
72 lines (62 loc) · 2.02 KB
/
RteKernelSlim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef RteKernelSlim_H
#define RteKernelSlim_H
/******************************************************************************/
/* RTE - CMSIS Run-Time Environment */
/******************************************************************************/
/** @file RteSlimKernel.h
* @brief CMSIS RTE Data Model : simple Kernel to be used for testing
@notes:
- this file is supposed to be used as include only,
- it is not linked to RteModel.lib.
- requires linking of XMLTreeSlim.lib
*/
/******************************************************************************/
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/******************************************************************************/
#include "RteKernel.h"
#include "RteValueAdjuster.h"
#include "RteItemBuilder.h"
#include "XMLTreeSlim.h"
// use simple XMLTree parser
/**
* @brief header-only class that uses simple XMLTree parser to parse cprj project and pdsc files
*/
class RteXmlTreeSlim : public XMLTreeSlim
{
public:
/**
* @brief constructor
*/
RteXmlTreeSlim(IXmlItemBuilder* itemBuilder) : XMLTreeSlim(itemBuilder, true, false) {
SetXmlValueAdjuster(new RteValueAdjuster(false));
}
/**
* @brief virtual destructor
*/
~RteXmlTreeSlim() override { delete m_XmlValueAdjuster; }
};
/**
* @brief using XMLTree parser this class exposes cprj project which consumes CMSIS RTE data
*/
class RteKernelSlim : public RteKernel
{
public:
/**
* @brief constructor
* @param callback RteCallback pointer
* @param globalModel RteGlobalModel pointer
*/
RteKernelSlim(RteCallback* callback = nullptr, RteGlobalModel* globalModel = nullptr) : RteKernel(callback, globalModel) {}
/**
* @brief constructor
* @param callback RteCallback pointer
*/
RteKernelSlim(RteGlobalModel* globalModel) : RteKernel(nullptr, globalModel) {}
protected:
XMLTree* CreateXmlTree(IXmlItemBuilder* itemBuilder) const override { return new RteXmlTreeSlim(itemBuilder);}
};
#endif // RteKernelSlim_H