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

An interface that contains functions. More...

#include <Interface.hpp>

Inheritance diagram for erpcgen::Interface:
erpcgen::Symbol

Public Types

typedef std::vector< Function * > function_vector_t
 
typedef std::vector< FunctionType * > function_types_vector_t
 
- Public Types inherited from erpcgen::Symbol
enum  symbol_type_t {
  kConstSymbol,
  kEnumMemberSymbol,
  kFunctionSymbol,
  kInterfaceSymbol,
  kProgramSymbol,
  kStructMemberSymbol,
  kTypenameSymbol,
  kUnionCaseMemberSymbol
}
 Supported symbol types.
 

Public Member Functions

 Interface (const Token &tok)
 Constructor. More...
 
void addFunction (Function *func)
 This function will add function to the interface. More...
 
void addFunctionType (FunctionType *func)
 This function will add function type to the interface. More...
 
SymbolScopegetScope ()
 This function return symbol scope. More...
 
const function_vector_tgetFunctions () const
 This function return interface functions vector. More...
 
const function_types_vector_tgetFunctionTypes () const
 This function return interface function types vector. More...
 
uint32_t getUniqueId () const
 This function get unique id of interface. More...
 
void setUniqueId (uint32_t newId)
 This function set unique id for interface. More...
 
virtual std::string getDescription () const override
 This function returns description about the interface. 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...
 
bool isConstSymbol () const
 This function is testing symbol type. More...
 
bool isEnumMemberSymbol () const
 This function is testing symbol type. More...
 
bool isFunctionSymbol () const
 This function is testing symbol type. More...
 
bool isInterfaceSymbol () const
 This function is testing symbol type. More...
 
bool isProgramSymbol () const
 This function is testing symbol type. More...
 
bool isStructMemberSymbol () const
 This function is testing symbol type. More...
 
bool isDatatypeSymbol () const
 This function is testing symbol type. More...
 
bool isUnionCaseSymbol () const
 This function is testing symbol type. More...
 
token_loc_tgetLocation ()
 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...
 
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...
 
AnnotationfindAnnotation (const std::string &name, Annotation::program_lang_t lang)
 Find annotation in the annotation list. More...
 
std::vector< Annotation * > getAnnotations (const 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...
 
ValuegetAnnValue (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 (const 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 (const std::string &comment)
 This function set inline comment for this symbol declared in IDL file. More...
 

Protected Attributes

SymbolScope m_scope
 
function_vector_t m_functions
 
function_types_vector_t m_functionTypes
 
uint32_t m_uniqueId
 
- Protected Attributes inherited from erpcgen::Symbol
symbol_type_t m_symbolType
 
std::string m_name
 
token_loc_t m_location
 
std::vector< Annotationm_annotations
 
std::string m_mlComment
 
std::string m_ilComment
 

Static Protected Attributes

static uint32_t s_idCounter
 

Detailed Description

An interface that contains functions.

Member Typedef Documentation

Vector of Interface function types.

Vector of Interface functions.

Constructor & Destructor Documentation

erpcgen::Interface::Interface ( const Token tok)
inlineexplicit

Constructor.

This function set symbol token to given token.

Parameters
[in]tokGiven token.

Member Function Documentation

void Interface::addFunction ( Function func)

This function will add function to the interface.

The function will add function given by pointer func to the interface members vector m_functions. Also this member will be added as symbol to interface symbol scope m_scope.

Parameters
[in]funcFunction pointer, which is added to interface members vector.
void Interface::addFunctionType ( FunctionType func)

This function will add function type to the interface.

The function will add function type given by pointer func to the interface members vector m_functionTypes. Also this member will be added as symbol to interface symbol scope m_scope.

Parameters
[in]funcFunction pointer, which is added to interface members vector.
string Interface::getDescription ( ) const
overridevirtual

This function returns description about the interface.

Returns
String description about interface.
See also
std::string Function::getDescription() const
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

Reimplemented from erpcgen::Symbol.

const function_vector_t& erpcgen::Interface::getFunctions ( ) const
inline

This function return interface functions vector.

Returns
Interface functions vector.
const function_types_vector_t& erpcgen::Interface::getFunctionTypes ( ) const
inline

This function return interface function types vector.

Returns
Interface function types vector.
SymbolScope& erpcgen::Interface::getScope ( )
inline

This function return symbol scope.

Returns
Symbol scope.
uint32_t erpcgen::Interface::getUniqueId ( ) const
inline

This function get unique id of interface.

Returns
Unique id for interface.
void erpcgen::Interface::setUniqueId ( uint32_t  newId)
inline

This function set unique id for interface.

Parameters
[in]newIdUnique id for interface.

Member Data Documentation

function_vector_t erpcgen::Interface::m_functions
protected

Vector of interface functions.

function_types_vector_t erpcgen::Interface::m_functionTypes
protected

Vector of interface function types.

SymbolScope erpcgen::Interface::m_scope
protected

Scope which interface belongs to.

uint32_t erpcgen::Interface::m_uniqueId
protected

Interface unique id.

uint32_t Interface::s_idCounter
staticprotected

Interface id counter. Each interface will increase this.


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