| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- File List

ArrayType.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__ARRAYTYPE_H_
11 #define _EMBEDDED_RPC__ARRAYTYPE_H_
12
13 #include "DataType.h"
14
15 #include <string>
16
18 // Classes
20
21 namespace erpcgen {
22
26 class ArrayType : public DataType
27 {
28 public:
37 ArrayType(DataType *elementType, uint32_t elementCount)
38 : DataType("(array)", kArrayType)
39 , m_elementType(elementType)
40 , m_elementCount(elementCount)
41 {
42 }
43
49 DataType *getElementType() const { return m_elementType; }
50
56 void setElementType(DataType *elementType) { m_elementType = elementType; }
57
63 virtual bool isArray() const { return true; }
64
79 virtual std::string getDescription() const;
80
86 uint32_t &getElementCount() { return m_elementCount; }
87
88 protected:
89 DataType *m_elementType;
90 uint32_t m_elementCount;
91 };
92
93 } // namespace erpcgen
94
95 #endif // _EMBEDDED_RPC__ARRAYTYPE_H_
erpcgen::ArrayType
Fixed length array of any other data type.
Definition: ArrayType.h:26
erpcgen::ArrayType::ArrayType
ArrayType(DataType *elementType, uint32_t elementCount)
Constructor.
Definition: ArrayType.h:37
erpcgen::ArrayType::setElementType
void setElementType(DataType *elementType)
This function set element data type.
Definition: ArrayType.h:56
erpcgen::ArrayType::getElementCount
uint32_t & getElementCount()
This function returns size of array.
Definition: ArrayType.h:86
erpcgen::ArrayType::m_elementType
DataType * m_elementType
Definition: ArrayType.h:89
erpcgen::ArrayType::isArray
virtual bool isArray() const
This function return "true" value for identify array type.
Definition: ArrayType.h:63
erpcgen::DataType
Base class for data types.
Definition: DataType.h:26
erpcgen::ArrayType::m_elementCount
uint32_t m_elementCount
Definition: ArrayType.h:90
erpcgen::ArrayType::getDescription
virtual std::string getDescription() const
This function returns description about the array.
Definition: Type.cpp:274
erpcgen::ArrayType::getElementType
DataType * getElementType() const
This function returns element data type.
Definition: ArrayType.h:49
erpcgen
Definition: AstNode.h:26