| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

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

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

Collects all definitions from an IDL. More...

`#include <InterfaceDefinition.h>`

## Public Types
enum | codec_t { kNotSpecified, kBasicCodec }

## Public Member Functions
| InterfaceDefinition ()
| Default constructor.
virtual | ~InterfaceDefinition ()
| Destructor.
void | init ()
| This function initialize symbol scope variable m_globals. More...
void | parse (const char *inputFile)
| This function parse given IDL file. More...
AstNode * | getAst ()
| This function returns node belong to this object. More...
SymbolScope & | getGlobals ()
| This function returns global symbol scope. More...
void | setProgramInfo (const std::string &fileName, const std::string &outputFilePath, codec_t codec)
| This function sets program information. More...
void | setProgramName (const std::string &programName)
| This function sets program name. More...
const std::string | getProgramName ()
| This function returns program name. More...
boost::filesystem::path | getOutputDirectory ()
| This function returns output directory path. More...
std::string | getOutputFilename ()
| This function returns output file name. More...
void | setOutputFilename (const std::string &filename)
| This function sets output file name. More...
bool | hasProgramSymbol ()
| This function returns information if program symbol was set in parsed file. More...
Program * | getProgramSymbol ()
| This function returns program symbol. More...
codec_t | getCodecType ()
| This function returns used codec type in eRPC application. More...
uint16_t | getIdlCrc16 ()
| This function returns crc16 of all used IDL files. More...

## Detailed Description

Collects all definitions from an IDL.

Also directs the IDL parsing and code generation process.

## Member Function Documentation

AstNode* erpcgen::InterfaceDefinition::getAst | ( |  | ) |
| inline

This function returns node belong to this object.

Returns
  AstNode * Node belong to this object.

codec_t erpcgen::InterfaceDefinition::getCodecType | ( |  | ) |
| inline

This function returns used codec type in eRPC application.

This information can bring more optimized code into generated output files.

Return values

  kNotSpecified | No optimization.
  kBasicCodec | BasicCodec type optimization.

SymbolScope& erpcgen::InterfaceDefinition::getGlobals | ( |  | ) |
| inline

This function returns global symbol scope.

Returns
  SymbolScope & Global symbol scope.

uint16_t erpcgen::InterfaceDefinition::getIdlCrc16 | ( |  | ) |
| inline

This function returns crc16 of all used IDL files.

Returns
  Crc16 of all used IDL files.

boost::filesystem::path erpcgen::InterfaceDefinition::getOutputDirectory | ( |  | ) |
| inline

This function returns output directory path.

Returns
  Return output directory path.

std::string erpcgen::InterfaceDefinition::getOutputFilename | ( |  | ) |
| inline

This function returns output file name.

Returns
  Return name of output file.

const std::string erpcgen::InterfaceDefinition::getProgramName | ( |  | ) |
| inline

This function returns program name.

Returns
  Return name of program.

Program * InterfaceDefinition::getProgramSymbol | ( |  | ) |

This function returns program symbol.

Returns
  Pointer to program symbol.

bool InterfaceDefinition::hasProgramSymbol | ( |  | ) |

This function returns information if program symbol was set in parsed file.

Return values

  true | When program was set in parsed file.
  true | When program wasn't set in parsed file.

void InterfaceDefinition::init | ( |  | ) |

This function initialize symbol scope variable m_globals.

See also
  void InterfaceDefinition::createBuiltinTypes()

void InterfaceDefinition::parse | ( | const char * | inputFile | ) |

This function parse given IDL file.

File content is split into AstNode three. Then dump AstNode three. Then is called symbol scanner to walk AstNode three.

Parameters

  [in] | inputFile | File, which is parsed.

Exceptions

  std::runtime_error | Thrown if is bad return result for parse function or no ast node three is created.

void InterfaceDefinition::setOutputFilename | ( | const std::string & | filename | ) |

This function sets output file name.

Parameters

  [in] | filename | Output file name.

void InterfaceDefinition::setProgramInfo | ( | const std::string & | fileName,
|  | const std::string & | outputFilePath,
|  | codec_t | codec
| ) |  |

This function sets program information.

This function sets out file name, output path and flag for generating each interface into its set of output files if requested.

Parameters

  [in] | fileName | Necessary for output files names.
  [in] | outputFilePath | Path to directory, where files will be generated.
  [in] | codec | Used codec type in eRPC application.

void erpcgen::InterfaceDefinition::setProgramName | ( | const std::string & | programName | ) |
| inline

This function sets program name.

Parameters

  [in] | programName | Name of program.

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

- InterfaceDefinition.h
- InterfaceDefinition.cpp