![]() |
eRPC Generator (erpcgen)
Rev. 1.12.0
NXP Semiconductors
|
Base class for all named declarations in the IDL. More...
#include <Symbol.hpp>
Public Types | |
| enum | symbol_type_t { kConstSymbol, kEnumMemberSymbol, kFunctionSymbol, kInterfaceSymbol, kProgramSymbol, kStructMemberSymbol, kTypenameSymbol, kUnionCaseMemberSymbol } |
| Supported symbol types. | |
Public Member Functions | |
| 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_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 std::string | getDescription () const |
| This function returns description about the symbol (symbol name). 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 (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... | |
| 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 (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 | |
| 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 |
Base class for all named declarations in the IDL.
|
inlineexplicit |
Constructor.
This function set symbol type variable to given symbol type.
| [in] | symType | Enum symbol type. |
|
inline |
Constructor.
This function set symbol type variable to given symbol type and name to given name.
| [in] | symType | Enum symbol type. |
| [in] | name | Name for symbol. |
|
inline |
Constructor.
This function set symbol type variable to given symbol type, name to token value and location to token location.
| [in] | symType | Enum symbol type. |
| [in] | tok | Token for symbol, which contains name and location. |
|
inline |
This function add annotation to vector of symbol annotations.
| [in] | a | AstNode contains annotation information. |
| Annotation * Symbol::findAnnotation | ( | const std::string & | name, |
| Annotation::program_lang_t | lang | ||
| ) |
Find annotation in the annotation list.
| [in] | name | Annotation name. |
| [in] | lang | Programing language for which is annotation intended. |
| vector< Annotation * > Symbol::getAnnotations | ( | const std::string & | name, |
| Annotation::program_lang_t | lang | ||
| ) |
Find annotations matching name in the annotation list.
| [in] | name | Annotation name. |
| [in] | lang | Programing language for which is annotation intended. |
|
inline |
| string Symbol::getAnnStringValue | ( | const std::string & | annName, |
| Annotation::program_lang_t | lang | ||
| ) |
This function search and returns string for given annotation name.
| [in] | annName | Given annotation name. |
| [in] | lang | Programing language for which is annotation intended. |
| Value * Symbol::getAnnValue | ( | const std::string & | annName, |
| Annotation::program_lang_t | lang | ||
| ) |
This function search and returns Value object for given annotation name.
| [in] | annName | Given annotation name. |
| [in] | lang | Programing language for which is annotation intended. |
|
inlinevirtual |
This function returns description about the symbol (symbol name).
Reimplemented in erpcgen::Function, erpcgen::UnionCase, erpcgen::Interface, erpcgen::EnumType, erpcgen::StructMember, erpcgen::EnumMember, erpcgen::UnionType, erpcgen::StructType, erpcgen::AliasType, erpcgen::ArrayType, erpcgen::ListType, erpcgen::FunctionType, and erpcgen::VoidType.
|
inline |
This function return first line from location of symbol.
|
inline |
This function returns inline comment for this symbol declared in IDL file.
|
inline |
This function return last line from location of symbol.
|
inline |
This function returns location for symbol.
|
inline |
This function returns multiline comment for this symbol declared in IDL file.
|
inline |
This function returns symbol name.
|
inline |
This function returns symbol type.
|
inline |
This function is testing symbol type.
| true | When symbol is ConstSymbol. |
| false | When symbol isn't ConstSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is TypenameSymbol. |
| false | When symbol isn't TypenameSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is EnumMemberSymbol. |
| false | When symbol isn't EnumMemberSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is FunctionSymbol. |
| false | When symbol isn't FunctionSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is InterfaceSymbol. |
| false | When symbol isn't InterfaceSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is ProgramSymbol. |
| false | When symbol isn't ProgramSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is StructMemberSymbol. |
| false | When symbol isn't StructMemberSymbol. |
|
inline |
This function is testing symbol type.
| true | When symbol is UnionCaseMemberSymbol. |
| false | When symbol isn't UnionCaseMemberSymbol. |
| string Symbol::printAnnotations | ( | ) |
This function returns description about annotation.
|
inline |
This function set inline comment for this symbol declared in IDL file.
| [in] | comment | Inline comment for symbol. |
|
inline |
This function set location for symbol.
| [in] | loc | Symbol location. |
|
inline |
This function set multiline comment for this symbol declared in IDL file.
| [in] | comment | Multiline comment for symbol. |
|
inline |
This function set symbol name.
| [in] | newName | New name for symbol. |
|
protected |
Vector of annotations belong to symbol.
|
protected |
Comment next to symbol.
|
protected |
Location in parsed file.
|
protected |
Comment above to symbol.
|
protected |
Symbol name.
|
protected |
Symbol type.