eRPC Generator (erpcgen)  Rev. 1.12.0
NXP Semiconductors
erpcgen::InterfaceDefinition Class Reference

Collects all definitions from an IDL. More...

#include <InterfaceDefinition.hpp>

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...
 
AstNodegetAst ()
 This function returns node belong to this object. More...
 
SymbolScopegetGlobals ()
 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...
 
std::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...
 
ProgramgetProgramSymbol ()
 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
kNotSpecifiedNo optimization.
kBasicCodecBasicCodec 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.
std::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
trueWhen program was set in parsed file.
trueWhen 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]inputFileFile, which is parsed.
Exceptions
std::runtime_errorThrown 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]filenameOutput 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]fileNameNecessary for output files names.
[in]outputFilePathPath to directory, where files will be generated.
[in]codecUsed codec type in eRPC application.
void erpcgen::InterfaceDefinition::setProgramName ( const std::string &  programName)
inline

This function sets program name.

Parameters
[in]programNameName of program.

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