| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- File List

AliasType.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__ALIASTYPE_H_
11 #define _EMBEDDED_RPC__ALIASTYPE_H_
12
13 #include "DataType.h"
14
15 #include <string>
16
18 // Classes
20
21 namespace erpcgen {
22
26 class AliasType : public DataType
27 {
28 public:
37 AliasType(std::string name, DataType *elementType)
38 : DataType(name, kAliasType, kAliasTypeSymbol)
39 , m_elementType(elementType)
40 {
41 }
42
51 AliasType(const Token &tok, DataType *elementType)
52 : DataType(tok, kAliasType, kAliasTypeSymbol)
53 , m_elementType(elementType)
54 {
55 }
56
62 virtual bool isAlias() const { return true; }
63
69 DataType *getElementType() const { return m_elementType; }
70
78 void setElementType(DataType *elementType) { m_elementType = elementType; }
79
94 virtual std::string getDescription() const;
95
96 protected:
97 DataType *m_elementType;
98 };
99
100 } // namespace erpcgen
101
102 #endif // _EMBEDDED_RPC__ALIASTYPE_H_
erpcgen::AliasType::AliasType
AliasType(const Token &tok, DataType *elementType)
Constructor.
Definition: AliasType.h:51
erpcgen::AliasType
Typedef.
Definition: AliasType.h:26
erpcgen::AliasType::isAlias
virtual bool isAlias() const
This function return "true" value for identify alias type.
Definition: AliasType.h:62
erpcgen::AliasType::setElementType
void setElementType(DataType *elementType)
This function set element data type.
Definition: AliasType.h:78
erpcgen::AliasType::getElementType
DataType * getElementType() const
This function return element data type.
Definition: AliasType.h:69
erpcgen::DataType
Base class for data types.
Definition: DataType.h:26
erpcgen::Token
Encapsulates all information about a token.
Definition: Token.h:60
erpcgen::AliasType::m_elementType
DataType * m_elementType
Definition: AliasType.h:97
erpcgen::AliasType::getDescription
virtual std::string getDescription() const
This function returns description about the alias.
Definition: Type.cpp:455
erpcgen::AliasType::AliasType
AliasType(std::string name, DataType *elementType)
Constructor.
Definition: AliasType.h:37
erpcgen
Definition: AstNode.h:26