| 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 | Protected Attributes | List of all members
erpcgen::DataType Class Reference

Base class for data types. More...

`#include <DataType.h>`

Inheritance diagram for erpcgen::DataType:

## Public Types
enum | _data_type { kAliasType, kArrayType, kBuiltinType, kEnumType, kFunctionType, kListType, kStructType, kUnionType, kVoidType }
| Supported data types.
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.

## Public Member Functions
| DataType (_data_type dataType)
| Constructor. More...
| DataType (const std::string &name, _data_type dataType)
| Constructor. More...
| DataType (const std::string &name, _data_type dataType, symbol_type_t symbolType)
| Constructor. More...
| DataType (const Token &tok, _data_type dataType, symbol_type_t symbolType)
| Constructor. More...
_data_type | getDataType () const
| This function returns data type. More...
DataType * | getTrueDataType ()
| This function returns pointer to true data type instead of alias. More...
DataType * | getTrueContainerDataType ()
| This function returns pointer to true data type (enum, builtin, structs) except lists and arrays. More...
virtual bool | isAlias () const
| This function return "false" value as default for identify alias type. More...
virtual bool | isArray () const
| This function return "false" value as default for identify array type. More...
virtual bool | isBinary () const
| This function return "false" value as default for identify binary type. More...
virtual bool | isBool () const
| This function return "false" value as default for identify bool type. More...
virtual bool | isBuiltin () const
| This function return "false" value as default for identify builtin type. More...
virtual bool | isEnum () const
| This function return "false" value as default for identify enum type. More...
virtual bool | isFunction () const
| This function return "false" value as default for identify function type. More...
virtual bool | isList () const
| This function return "false" value as default for identify list type. More...
virtual bool | isScalar () const
| This function return "false" value as default for identify scalar builtin type. More...
virtual bool | isString () const
| This function return "false" value as default for identify string type. More...
virtual bool | isUString () const
| This function return "false" value as default for identify ustring type. More...
virtual bool | isStruct () const
| This function return "false" value as default for identify struct type. More...
virtual bool | isUnion () const
| This function return "false" value as default for identify union type. More...
virtual bool | isVoid () const
| This function return "false" value as default for identify void type. 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 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 (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
_data_type | m_dataType
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

## Detailed Description

Base class for data types.

## Constructor & Destructor Documentation

erpcgen::DataType::DataType | ( | _data_type | dataType | ) |
| inline

Constructor.

This function set data type to given data type.

Parameters

  [in] | dataType | Given data type.

erpcgen::DataType::DataType | ( | const std::string & | name,
|  | _data_type | dataType
| ) |  |
| inline

Constructor.

This function set data type to given data type and symbol name to given name.

Parameters

  [in] | dataType | Given data type.
  [in] | name | Given name for symbol.

erpcgen::DataType::DataType | ( | const std::string & | name,
|  | _data_type | dataType,
|  | symbol_type_t | symbolType
| ) |  |
| inline

Constructor.

This function set data type to given data type, symbol name to given name and symbol type to given symbol type.

Parameters

  [in] | name | Given name for symbol.
  [in] | dataType | Given data type.
  [in] | symbolType | Given symbol type for symbol.

erpcgen::DataType::DataType | ( | const Token & | tok,
|  | _data_type | dataType,
|  | symbol_type_t | symbolType
| ) |  |
| inline

Constructor.

This function set data type to given data type, symbol token to given token and symbol type to given symbol type.

Parameters

  [in] | tok | Token, which contains name and location.
  [in] | dataType | Given data type.
  [in] | symbolType | Given symbol type for symbol.

## Member Function Documentation

_data_type erpcgen::DataType::getDataType | ( |  | ) | const
| inline

This function returns data type.

Returns
  Data type of current object.

DataType * DataType::getTrueContainerDataType | ( |  | ) |

This function returns pointer to true data type (enum, builtin, structs) except lists and arrays.

The function returns pointer to true data type (enum, builtin, structs) except lists and arrays. When array or list data type are founded, it will search in their elements data types for last element data type which will be (enum, builtin, structs).

Returns
  Pointer to true data type (enum, builtin, structs) of current object.

DataType * DataType::getTrueDataType | ( |  | ) |

This function returns pointer to true data type instead of alias.

The function returns pointer to true data type instead of alias name.

Returns
  True data type of current object.

virtual bool erpcgen::DataType::isAlias | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify alias type.

Return values

  false | Always return false.

Reimplemented in erpcgen::AliasType.

virtual bool erpcgen::DataType::isArray | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify array type.

Return values

  false | Always return false.

Reimplemented in erpcgen::ArrayType.

virtual bool erpcgen::DataType::isBinary | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify binary type.

Return values

  false | Always return false.

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isBool | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify bool type.

Return values

  false | Always return false.

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isBuiltin | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify builtin type.

Return values

  false | Always return false.

Reimplemented from erpcgen::Symbol.

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isEnum | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify enum type.

Return values

  false | Always return false.

Reimplemented in erpcgen::EnumType.

virtual bool erpcgen::DataType::isFunction | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify function type.

Return values

  false | Always return false.

Reimplemented in erpcgen::FunctionType.

virtual bool erpcgen::DataType::isList | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify list type.

Return values

  false | Always return false.

Reimplemented in erpcgen::ListType.

virtual bool erpcgen::DataType::isScalar | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify scalar builtin type.

Return values

  false | Always return false;

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isString | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify string type.

Return values

  false | Always return false.

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isStruct | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify struct type.

Return values

  false | Always return false.

Reimplemented in erpcgen::StructType.

virtual bool erpcgen::DataType::isUnion | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify union type.

Return values

  false | Always return false.

Reimplemented in erpcgen::UnionType.

virtual bool erpcgen::DataType::isUString | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify ustring type.

Return values

  false | Always return false.

Reimplemented in erpcgen::BuiltinType.

virtual bool erpcgen::DataType::isVoid | ( |  | ) | const
| inline virtual

This function return "false" value as default for identify void type.

Return values

  false | Always return false.

Reimplemented in erpcgen::VoidType.

## Member Data Documentation

_data_type erpcgen::DataType::m_dataType
| protected

Data type of current object

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

- DataType.h
- Type.cpp