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

Member of a struct. More...

#include <StructMember.hpp>

Inheritance diagram for erpcgen::StructMember:
erpcgen::Symbol

Public Member Functions

 StructMember (const std::string &name, DataType *dataType)
 Constructor. More...
 
 StructMember (const Token &tok, DataType *dataType)
 Constructor. More...
 
DataTypegetDataType ()
 This function returns pointer to element data type. More...
 
void setDataType (DataType *dataType)
 This function will set element data type. More...
 
virtual std::string getDescription () const override
 This function returns description about the struct member. More...
 
void setDirection (param_direction_t paramDirection)
 This function set direction type for parameter. More...
 
param_direction_t getDirection () const
 This function returns routing for parameter. More...
 
void setContainList (bool containList)
 This function set information about if member contains list data type. More...
 
bool getContainList ()
 This function set information about if member contains list data type. More...
 
void setContainString (bool containString)
 This function set information about if member contains string data type. More...
 
bool getContainString ()
 This function set information about if member contains string data type. More...
 
bool isByref ()
 This function returns information if parameter is byref. More...
 
void setByref (bool byref)
 This function sets byref flag to the paramter. 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

DataTypem_dataType
 
param_direction_t m_paramDirection
 
bool m_containList
 
bool m_containString
 
bool m_byref
 
- 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
 

Additional Inherited Members

- Public Types inherited from erpcgen::Symbol
enum  symbol_type_t {
  kConstSymbol,
  kEnumMemberSymbol,
  kFunctionSymbol,
  kInterfaceSymbol,
  kProgramSymbol,
  kStructMemberSymbol,
  kTypenameSymbol,
  kUnionCaseMemberSymbol
}
 Supported symbol types.
 

Detailed Description

Member of a struct.

Constructor & Destructor Documentation

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

Constructor.

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

Parameters
[in]nameGiven name.
[in]dataTypeGiven data type.
erpcgen::StructMember::StructMember ( const Token tok,
DataType dataType 
)
inline

Constructor.

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

Parameters
[in]tokGiven token.
[in]dataTypeGiven data type.

Member Function Documentation

bool erpcgen::StructMember::getContainList ( )
inline

This function set information about if member contains list data type.

Returns
Information about if member contains list data type.
bool erpcgen::StructMember::getContainString ( )
inline

This function set information about if member contains string data type.

Returns
Information about if member contains string data type.
DataType* erpcgen::StructMember::getDataType ( )
inline

This function returns pointer to element data type.

Returns
Pointer to element data type.
string StructMember::getDescription ( ) const
overridevirtual

This function returns description about the struct member.

Returns
String description about struct member.
See also
std::string AliasType::getDescription() const
std::string EnumType::getDescription() const
std::string EnumMember::getDescription() const
std::string StructType::getDescription() const
std::string VoidType::getDescription() const
std::string ArrayType::getDescription() const
std::string ListType::getDescription() const
std::string UnionType::getDescription() const

Reimplemented from erpcgen::Symbol.

param_direction_t erpcgen::StructMember::getDirection ( ) const
inline

This function returns routing for parameter.

This is used in function's parameters.They can be set as in, out, inout.

Returns
Returns routing type for parameter in functions.
bool erpcgen::StructMember::isByref ( )
inline

This function returns information if parameter is byref.

Return values
Truewhen paramter is byref, else false.
void erpcgen::StructMember::setByref ( bool  byref)
inline

This function sets byref flag to the paramter.

Parameters
[in]byrefParameter flag to set byref option.
void erpcgen::StructMember::setContainList ( bool  containList)
inline

This function set information about if member contains list data type.

Parameters
[in]containListInformation about if member contains list data type.
void erpcgen::StructMember::setContainString ( bool  containString)
inline

This function set information about if member contains string data type.

Parameters
[in]containStringInformation about if member contains string data type.
void erpcgen::StructMember::setDataType ( DataType dataType)
inline

This function will set element data type.

Parameters
[in]dataTypePointer to element data type.
void erpcgen::StructMember::setDirection ( param_direction_t  paramDirection)
inline

This function set direction type for parameter.

This is used in function's parameters.They can be set as in, out, inout.

Parameters
[in]paramDirectionDefine direction type for parameter in functions.

Member Data Documentation

bool erpcgen::StructMember::m_byref
protected

True when member is byref type

bool erpcgen::StructMember::m_containList
protected

True when member contains list type

bool erpcgen::StructMember::m_containString
protected

True when member contains string type

DataType* erpcgen::StructMember::m_dataType
protected

Struct member data type.

param_direction_t erpcgen::StructMember::m_paramDirection
protected

Direction in which is member used.


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