eRPC Generator (erpcgen)  Rev. 1.11.0
NXP Semiconductors
AliasType.hpp
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.hpp"
14 
15 #include <string>
16 
18 // Classes
20 
21 namespace erpcgen {
22 
26 class AliasType : public DataType
27 {
28 public:
37  AliasType(const std::string &name, DataType *elementType)
38  : DataType(name, kAliasType)
39  , m_elementType(elementType)
40  {
41  }
42 
51  AliasType(const Token &tok, DataType *elementType)
52  : DataType(tok, kAliasType)
53  , m_elementType(elementType)
54  {
55  }
56 
62  DataType *getElementType() const { return m_elementType; }
63 
71  void setElementType(DataType *elementType) { m_elementType = elementType; }
72 
87  virtual std::string getDescription() const override;
88 
89 protected:
91 };
92 
93 } // namespace erpcgen
94 
95 #endif // _EMBEDDED_RPC__ALIASTYPE_H_
AliasType(const Token &tok, DataType *elementType)
Constructor.
Definition: AliasType.hpp:51
virtual std::string getDescription() const override
This function returns description about the alias.
Definition: Type.cpp:456
Typedef.
Definition: AliasType.hpp:26
void setElementType(DataType *elementType)
This function set element data type.
Definition: AliasType.hpp:71
DataType * getElementType() const
This function return element data type.
Definition: AliasType.hpp:62
AliasType(const std::string &name, DataType *elementType)
Constructor.
Definition: AliasType.hpp:37
Base class for data types.
Definition: DataType.hpp:26
Encapsulates all information about a token.
Definition: Token.hpp:60
DataType * m_elementType
Definition: AliasType.hpp:90
Definition: AstNode.hpp:26