| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- File List

Group.h
1 /*
2 * Copyright 2017 NXP
3 * All rights reserved.
4 *
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9 #ifndef _EMBEDDED_RPC__GROUP_H_
10 #define _EMBEDDED_RPC__GROUP_H_
11
12 #include "Interface.h"
13 #include "cpptempl.h"
14
15 #include <set>
16 #include <string>
17 #include <vector>
18
20 // Classes
22
23 namespace erpcgen {
24
28 class Group
29 {
30 public:
31 typedef std::vector<Interface *> interface_list_t;
32 typedef std::vector<Symbol *> symbols_list_t;
33 typedef std::map<Symbol *, std::set<_param_direction> >
34 symbol_directions_map_t;
41 Group(const std::string name)
42 : m_name(name)
43 {
44 }
45
51 const std::string &getName() const { return m_name; }
52
58 void addInterface(Interface *iface);
59
65 const interface_list_t &getInterfaces() const { return m_interfaces; }
66
73 void addDirToSymbolsMap(Symbol *symbol, _param_direction dir);
74
82 const std::set<_param_direction> getSymbolDirections(Symbol *symbol) const;
83
91 const symbols_list_t &getSymbols() const { return m_symbols; }
92
98 void setTemplate(cpptempl::data_map groupTemplate);
99
105 cpptempl::data_map &getTemplate() { return m_template; }
106
122 std::string getDescription() const;
123
124 private:
125 interface_list_t m_interfaces;
126 symbol_directions_map_t m_symbolDirections;
127 symbols_list_t m_symbols;
128 cpptempl::data_map m_template;
129 std::string m_name;
130 };
131
132 } // namespace erpcgen
133
134 #endif // _EMBEDDED_RPC__GROUP_H_
erpcgen::Group::getSymbolDirections
const std::set< _param_direction > getSymbolDirections(Symbol *symbol) const
This function returns set with symbol directions.
Definition: Type.cpp:426
erpcgen::Group::Group
Group(const std::string name)
Constructor.
Definition: Group.h:41
erpcgen::Group::getSymbols
const symbols_list_t & getSymbols() const
This function returns vector with symbols.
Definition: Group.h:91
erpcgen::Group::getDescription
std::string getDescription() const
This function returns description about the interface.
Definition: Type.cpp:438
erpcgen::Symbol
Base class for all named declarations in the IDL.
Definition: Symbol.h:28
erpcgen::Group::addDirToSymbolsMap
void addDirToSymbolsMap(Symbol *symbol, _param_direction dir)
This function will add direction for specified symbol held in a symbol map.
Definition: Type.cpp:400
erpcgen::Group::getTemplate
cpptempl::data_map & getTemplate()
This function returns group template.
Definition: Group.h:105
erpcgen::Group::getName
const std::string & getName() const
This function returns the group name.
Definition: Group.h:51
erpcgen::Group::interface_list_t
std::vector< Interface * > interface_list_t
Definition: Group.h:31
erpcgen::Group::symbols_list_t
std::vector< Symbol * > symbols_list_t
Definition: Group.h:32
erpcgen::Group
An interface that contains functions.
Definition: Group.h:28
erpcgen::Group::symbol_directions_map_t
std::map< Symbol *, std::set< _param_direction > > symbol_directions_map_t
Definition: Group.h:34
cpptempl::data_map
Definition: cpptempl.h:190
erpcgen::Group::setTemplate
void setTemplate(cpptempl::data_map groupTemplate)
This function will set group template.
Definition: Type.cpp:421
erpcgen::Interface
An interface that contains functions.
Definition: Interface.h:29
erpcgen::Group::addInterface
void addInterface(Interface *iface)
This function will add pointer to interface into vector of group interfaces.
Definition: Type.cpp:394
erpcgen
Definition: AstNode.h:26
erpcgen::Group::getInterfaces
const interface_list_t & getInterfaces() const
This function returns vector with pointers to interfaces belonging to the group.
Definition: Group.h:65