| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

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

Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
erpcgen::Function Class Reference

Function declaration. More...

`#include <Function.h>`

Inheritance diagram for erpcgen::Function:

## Public Member Functions
| Function (const Token &tok, Interface *interface)
| Constructor. More...
| Function (const Token &tok, Interface *interface, uint32_t uniqueId)
| Constructor. More...
uint32_t | getUniqueId () const
| This function returns function unique id. More...
void | setUniqueId (uint32_t newId)
| This function set function unique id. More...
Interface * | getInterface () const
| This function returns parent Interface. More...
virtual std::string | getDescription () const
| This function returns description about the interface function. More...
void | setFunctionType (FunctionType *functionType)
| This function sets FunctionType (callback type). More...
FunctionType * | getFunctionType () const
| This function returns FunctionType (callback type). More...
Public Member Functions inherited from erpcgen::FunctionBase
| FunctionBase ()
| Constructor.
StructType & | getParameters ()
| This function returns function parameters. More...
DataType * | getReturnType ()
| This function returns data type of function return value. More...
StructMember * | getReturnStructMemberType ()
| This function returns data type of function return value. More...
void | setReturnStructMemberType (StructMember *returnType)
| This function set data type of function return value. More...
bool | isOneway () const
| This function returns true/false, when function return type is/isn't oneway. More...
void | setIsOneway (bool argIsOneway)
| This function set true/false, when function return type is/isn't oneway. More...
Public Member Functions inherited from erpcgen::Symbol
| Symbol (symbol_type_t symType)
| Constructor. More...
| Symbol (symbol_type_t symType, const std::string &name)
| Constructor. More...
| Symbol (symbol_type_t symType, const Token &tok)
| Constructor. More...
virtual | ~Symbol ()
| Destructor.
symbol_type_t | getSymbolType () const
| This function returns symbol type. More...
const std::string & | getName () const
| This function returns symbol name. More...
void | setName (const std::string &newName)
| This function set symbol name. More...
token_loc_t & | getLocation ()
| This function returns location for symbol. More...
void | setLocation (const token_loc_t &loc)
| This function set location for symbol. More...
int | getFirstLine () const
| This function return first line from location of symbol. More...
int | getLastLine () const
| This function return last line from location of symbol. More...
virtual bool | isBuiltin () const
| This function return "false" value as default for identify builtin type. More...
void | addAnnotation (const Annotation &a)
| This function add annotation to vector of symbol annotations. More...
std::string | printAnnotations ()
| This function returns description about annotation. More...
Annotation * | findAnnotation (std::string name, Annotation::program_lang_t lang)
| Find annotation in the annotation list. More...
std::vector< Annotation * > | getAnnotations (std::string name, Annotation::program_lang_t lang)
| Find annotations matching name in the annotation list. More...
const std::vector< Annotation > & | getAnnotations () const
| Return all Symbol annotations. More...
Value * | getAnnValue (const std::string annName, Annotation::program_lang_t lang)
| This function search and returns Value object for given annotation name. More...
std::string | getAnnStringValue (const std::string annName, Annotation::program_lang_t lang)
| This function search and returns string for given annotation name. More...
std::string | getMlComment ()
| This function returns multiline comment for this symbol declared in IDL file. More...
void | setMlComment (std::string comment)
| This function set multiline comment for this symbol declared in IDL file. More...
std::string | getIlComment ()
| This function returns inline comment for this symbol declared in IDL file. More...
void | setIlComment (std::string comment)
| This function set inline comment for this symbol declared in IDL file. More...

## Protected Attributes
uint32_t | m_uniqueId
Interface * | m_interface
FunctionType * | m_functionType
Protected Attributes inherited from erpcgen::FunctionBase
StructType | m_parameters
StructMember * | m_returnType
bool | m_isOneway
Protected Attributes inherited from erpcgen::Symbol
symbol_type_t | m_symbolType
std::string | m_name
token_loc_t | m_location
std::vector< Annotation > | m_annotations
std::string | m_mlComment
std::string | m_ilComment

## Static Protected Attributes
static uint32_t | s_idCounter

## Additional Inherited Members
Public Types inherited from erpcgen::Symbol
enum | symbol_type_t { kConstSymbol, kEnumMemberSymbol, kFunctionSymbol, kInterfaceSymbol, kProgramSymbol, kStructMemberSymbol, kTypenameSymbol, kUnionCaseMemberSymbol, kAliasTypeSymbol, kArrayTypeSymbol, kBuiltinTypeSymbol, kEnumTypeSymbol, kFunctionTypeSymbol, kListTypeSymbol, kStructTypeSymbol, kUnionTypeSymbol }
| Supported symbol types.

## Detailed Description

Function declaration.

The function's parameters are represented by a StructType object.

## Constructor & Destructor Documentation

erpcgen::Function::Function | ( | const Token & | tok,
|  | Interface * | interface
| ) |  |
| inline

Constructor.

This function set symbol token to given token.

Parameters

  [in] | tok | Given token.
  [in] | m_interface | Parent interface.

erpcgen::Function::Function | ( | const Token & | tok,
|  | Interface * | interface,
|  | uint32_t | uniqueId
| ) |  |
| inline

Constructor.

This function set symbol token to given token, uniqueId and idCounter to given uniqueId.

Parameters

  [in] | tok | Given token.
  [in] | m_interface | Parent interface.
  [in] | uniqueId | Given unique function id.

## Member Function Documentation

string Function::getDescription | ( |  | ) | const
| virtual

This function returns description about the interface function.

Returns
  String description about interface function.

See also
  std::string AliasType::getDescription() const
  std::string EnumMember::getDescription() const
  std::string EnumType::getDescription() const
  std::string StructMember::getDescription() const
  std::string StructType::getDescription() const
  std::string VoidType::getDescription() const
  std::string ArrayType::getDescription() const
  std::string ListType::getDescription() const

Implements erpcgen::FunctionBase.

FunctionType* erpcgen::Function::getFunctionType | ( |  | ) | const
| inline

This function returns FunctionType (callback type).

Returns
  FunctionType (callback type).

Interface* erpcgen::Function::getInterface | ( |  | ) | const
| inline

This function returns parent Interface.

Returns
  parent Interface.

uint32_t erpcgen::Function::getUniqueId | ( |  | ) | const
| inline

This function returns function unique id.

Returns
  Function unique id.

void erpcgen::Function::setFunctionType | ( | FunctionType * | functionType | ) |
| inline

This function sets FunctionType (callback type).

Parameters

  [in] | functionType | FunctionType (callback type).

void erpcgen::Function::setUniqueId | ( | uint32_t | newId | ) |
| inline

This function set function unique id.

Parameters

  [in] | newId | New function unique id.

## Member Data Documentation

FunctionType* erpcgen::Function::m_functionType
| protected

Parent interface.

Interface* erpcgen::Function::m_interface
| protected

Parent interface.

uint32_t erpcgen::Function::m_uniqueId
| protected

Function unique id.

uint32_t Function::s_idCounter
| static protected

Function id counter. Each function will increase this.

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

- Function.h
- Type.cpp