| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- File List

Interface.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__INTERFACE_H_
11 #define _EMBEDDED_RPC__INTERFACE_H_
12
13 #include "Function.h"
14 #include "Symbol.h"
15 #include "SymbolScope.h"
16
17 #include <string>
18 #include <vector>
19
21 // Classes
23
24 namespace erpcgen {
25
29 class Interface : public Symbol
30 {
31 public:
32 typedef std::vector<Function *> function_vector_t;
41 Interface(const Token &tok)
42 : Symbol(kInterfaceSymbol, tok)
43 , m_scope()
44 , m_uniqueId(s_idCounter++)
45 {
46 }
47
56 void addFunction(Function *func);
57
63 SymbolScope &getScope() { return m_scope; }
64
70 function_vector_t &getFunctions() { return m_functions; }
71
77 uint32_t getUniqueId() const { return m_uniqueId; }
78
84 void setUniqueId(uint32_t newId) { m_uniqueId = newId; }
85
101 virtual std::string getDescription() const;
102
103 protected:
104 SymbolScope m_scope;
105 function_vector_t m_functions;
106 uint32_t m_uniqueId;
108 static uint32_t s_idCounter;
109 };
110
111 } // namespace erpcgen
112
113 #endif // _EMBEDDED_RPC__INTERFACE_H_
erpcgen::Interface::m_functions
function_vector_t m_functions
Definition: Interface.h:105
erpcgen::Interface::addFunction
void addFunction(Function *func)
This function will add function to the interface.
Definition: Type.cpp:508
erpcgen::Interface::setUniqueId
void setUniqueId(uint32_t newId)
This function set unique id for interface.
Definition: Interface.h:84
erpcgen::Interface::getScope
SymbolScope & getScope()
This function return symbol scope.
Definition: Interface.h:63
erpcgen::Interface::getFunctions
function_vector_t & getFunctions()
This function return interface functions vector.
Definition: Interface.h:70
erpcgen::Function
Function declaration.
Definition: Function.h:117
erpcgen::Symbol
Base class for all named declarations in the IDL.
Definition: Symbol.h:28
erpcgen::Interface::m_uniqueId
uint32_t m_uniqueId
Definition: Interface.h:106
erpcgen::Interface::Interface
Interface(const Token &tok)
Constructor.
Definition: Interface.h:41
erpcgen::Interface::function_vector_t
std::vector< Function * > function_vector_t
Definition: Interface.h:32
erpcgen::SymbolScope
A scoped namespace containing symbols.
Definition: SymbolScope.h:28
erpcgen::Interface::m_scope
SymbolScope m_scope
Definition: Interface.h:104
erpcgen::Token
Encapsulates all information about a token.
Definition: Token.h:60
erpcgen::Interface::getUniqueId
uint32_t getUniqueId() const
This function get unique id of interface.
Definition: Interface.h:77
erpcgen::Interface::getDescription
virtual std::string getDescription() const
This function returns description about the interface.
Definition: Type.cpp:516
erpcgen::Interface
An interface that contains functions.
Definition: Interface.h:29
erpcgen::Interface::s_idCounter
static uint32_t s_idCounter
Definition: Interface.h:108
erpcgen
Definition: AstNode.h:26