eRPC Generator (erpcgen)  Rev. 1.9.0
NXP Semiconductors
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:
98 };
99 
100 } // namespace erpcgen
101 
102 #endif // _EMBEDDED_RPC__ALIASTYPE_H_
AliasType(const Token &tok, DataType *elementType)
Constructor.
Definition: AliasType.h:51
Typedef.
Definition: AliasType.h:26
virtual bool isAlias() const
This function return "true" value for identify alias type.
Definition: AliasType.h:62
void setElementType(DataType *elementType)
This function set element data type.
Definition: AliasType.h:78
DataType * getElementType() const
This function return element data type.
Definition: AliasType.h:69
Base class for data types.
Definition: DataType.h:26
Encapsulates all information about a token.
Definition: Token.h:60
DataType * m_elementType
Definition: AliasType.h:97
virtual std::string getDescription() const
This function returns description about the alias.
Definition: Type.cpp:455
AliasType(std::string name, DataType *elementType)
Constructor.
Definition: AliasType.h:37
Definition: AstNode.h:26