| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
erpcgen::CGenerator Class Reference

Code generator for C. More...

`#include <CGenerator.h>`

Inheritance diagram for erpcgen::CGenerator:

## Public Member Functions
| CGenerator (InterfaceDefinition *def)
| This function is constructor of CGenerator class. More...
virtual | ~CGenerator ()
| This function is destructor of CGenerator class. More...
virtual void | generate ()
| This function generate output code for output files. More...
Public Member Functions inherited from erpcgen::Generator
| Generator (InterfaceDefinition *def, generator_type_t generatorType)
| Constructor. More...
virtual | ~Generator ()
| Destructor.

## Additional Inherited Members
Public Types inherited from erpcgen::Generator
enum | generator_type_t { kC, kPython }
Protected Member Functions inherited from erpcgen::Generator
void | openFile (std::ofstream &fileOutputStream, const std::string &fileName)
| This function open file. More...
void | generateOutputFile (const std::string &fileName, const std::string &templateName, cpptempl::data_map &templateData, const char *const kParseFile)
| This function open file, generate output into this file and close this file. More...
std::string | stripExtension (const std::string &filename)
StructMember * | findParamReferencedFromAnn (const StructType::member_vector_t &members, const std::string &referenceName, const std::string &annName)
| This function will return pointer to function parameter/structure member where given reference name is referenced for. More...
StructMember * | findParamReferencedFromUnion (const StructType::member_vector_t &members, const std::string &referenceName)
| This function will return pointer to function parameter/structure member where given reference name is referenced for. More...
StructMember * | findParamReferencedFrom (const StructType::member_vector_t &members, const std::string &referenceName)
| This function will return pointer to function parameter/structure member where given reference name is referenced for. Combines findParamReferencedFromUnion and findParamReferencedFromAnn. More...
std::string | getTime ()
| This function return actual time string representation. More...
void | findGroupDataTypes ()
| This function finds all group's data types.
cpptempl::data_list | makeGroupInterfacesTemplateData (Group *group)
| This function sets interfaces template data. More...
void | generateGroupOutputFiles (Group *group)
| This function generates output files for defined interfaces. More...
void | makeIncludesTemplateData ()
| This function sets template data for include directives from an IDL file.
cpptempl::data_list | makeGroupIncludesTemplateData (Group *group)
| This function sets template data for group include directives. More...
Group * | getGroupByName (std::string name)
| This function returns pointer to a group with specified name. More...
bool | isMemberDataTypeUsingForwardDeclaration (Symbol *topSymbol, Symbol *memberSymbol)
| This function returns information if member data type symbol is using forward declared type. More...
std::string | getOutputName (Symbol *symbol, bool check=true)
Annotation::program_lang_t | getAnnotationLang ()
| Returns Generator flag used for annotation. More...
Annotation * | findAnnotation (Symbol *symbol, std::string name)
| Find annotation in the annotation list. More...
std::vector< Annotation * > | getAnnotations (Symbol *symbol, std::string name)
| Find annotations matching name in the annotation list. More...
Value * | getAnnValue (Symbol *symbol, std::string name)
| This function search and returns Value object for given annotation name. More...
std::string | getAnnStringValue (Symbol *symbol, std::string name)
| This function search and returns string for given annotation name. More...
Protected Attributes inherited from erpcgen::Generator
uint16_t | m_idlCrc16
cpptempl::data_map | m_templateData
InterfaceDefinition * | m_def
SymbolScope * | m_globals
std::vector< Group * > | m_groups
std::set< std::string > | reserverdWords
generator_type_t | m_generatorType
boost::filesystem::path | m_outputDirectory

## Detailed Description

Code generator for C.

## Constructor & Destructor Documentation

CGenerator::CGenerator | ( | InterfaceDefinition * | def | ) |

This function is constructor of CGenerator class.

Interface definition contains all information about parsed files and builtin types.

Parameters

  [in] | def | Contains all Symbols parsed from IDL files.

virtual erpcgen::CGenerator::~CGenerator | ( |  | ) |
| inline virtual

This function is destructor of CGenerator class.

This function close opened files.

## Member Function Documentation

void CGenerator::generate | ( |  | ) |
| virtual

This function generate output code for output files.

This code call all necessary functions for prepare output code and parse it into output files.

Implements erpcgen::Generator.

The documentation for this class was generated from the following files:

- CGenerator.h
- CGenerator.cpp