| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- File List

ConstType.h
1 /*
2 * Copyright (c) 2014, Freescale Semiconductor, Inc.
3 * Copyright 2016 NXP
4 * All rights reserved.
5 *
6 *
7 * SPDX-License-Identifier: BSD-3-Clause
8 */
9
10 #ifndef _EMBEDDED_RPC__CONST_H_
11 #define _EMBEDDED_RPC__CONST_H_
12
13 #include "DataType.h"
14 #include "Symbol.h"
15
16 #include <string>
17
19 // Classes
21
22 namespace erpcgen {
23
27 class ConstType : public Symbol
28 {
29 public:
39 ConstType(const Token &tok, DataType *dataType, Value *value)
40 : Symbol(kConstSymbol, tok)
41 , m_dataType(dataType)
42 , m_value(value)
43 {
44 }
45
51 DataType *getDataType() { return m_dataType; }
52
58 Value *getValue() { return m_value; }
59
65 void setDataType(DataType *dataType) { m_dataType = dataType; }
66
72 void setValue(Value *value) { m_value = value; }
73
74 protected:
75 DataType *m_dataType;
76 Value *m_value;
77 };
78
79 } // namespace erpcgen
80
81 #endif // _EMBEDDED_RPC__CONST_H_
erpcgen::ConstType::setDataType
void setDataType(DataType *dataType)
This function sets constant data type.
Definition: ConstType.h:65
erpcgen::ConstType::m_value
Value * m_value
Definition: ConstType.h:76
erpcgen::ConstType::ConstType
ConstType(const Token &tok, DataType *dataType, Value *value)
Constructor.
Definition: ConstType.h:39
erpcgen::ConstType
Const class.
Definition: ConstType.h:27
erpcgen::ConstType::setValue
void setValue(Value *value)
This function sets constant value.
Definition: ConstType.h:72
erpcgen::ConstType::getValue
Value * getValue()
This function returns value of constant data type.
Definition: ConstType.h:58
erpcgen::Symbol
Base class for all named declarations in the IDL.
Definition: Symbol.h:28
erpcgen::ConstType::m_dataType
DataType * m_dataType
Definition: ConstType.h:75
Value
Abstract base class for values of arbitrary types.
Definition: Value.h:27
erpcgen::DataType
Base class for data types.
Definition: DataType.h:26
erpcgen::Token
Encapsulates all information about a token.
Definition: Token.h:60
erpcgen::ConstType::getDataType
DataType * getDataType()
This function returns pointer to element data type.
Definition: ConstType.h:51
erpcgen
Definition: AstNode.h:26