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

Annotation class. More...

#include <Annotation.hpp>

Public Types

enum  program_lang_t {
  kAll,
  kC,
  kPython,
  kJava
}
 

Public Member Functions

 Annotation (const Token &token, Value *val, program_lang_t lang)
 Constructor. More...
 
 Annotation (const Token &token)
 Constructor. More...
 
 Annotation (const Annotation &a)
 Constructor. More...
 
std::string getName () const
 This function returns annotation name. More...
 
bool hasValue ()
 Checks to see if value instance member is null. More...
 
Value * getValueObject ()
 This function returns annotation value. More...
 
program_lang_t getLang () const
 This function returns programming language type for which is annotation intended. More...
 
std::string toString ()
 This function returns toString representation. More...
 
token_loc_t & getLocation ()
 This function returns location for symbol. More...
 

Detailed Description

Annotation class.

Constructor & Destructor Documentation

erpcgen::Annotation::Annotation ( const Token &  token,
Value *  val,
program_lang_t  lang 
)
inline

Constructor.

This function initializes object attributes from given Token and Value.

Parameters
[in]tokenToken contains annotation name and location in parsed file.
[in]valPointer to value.
[in]langProgramming language for which is annotation intended.
erpcgen::Annotation::Annotation ( const Token &  token)
inlineexplicit

Constructor.

This function initializes object attributes from given Token.

Parameters
[in]tokenToken contains annotation name and location in parsed file.
erpcgen::Annotation::Annotation ( const Annotation &  a)
inlineexplicit

Constructor.

This function initializes object attributes from given annotation.

Parameters
[in]aSource annotation.

Member Function Documentation

program_lang_t erpcgen::Annotation::getLang ( ) const
inline

This function returns programming language type for which is annotation intended.

Returns
Programming language type.
token_loc_t& erpcgen::Annotation::getLocation ( )
inline

This function returns location for symbol.

Returns
Return location for symbol.
std::string erpcgen::Annotation::getName ( ) const
inline

This function returns annotation name.

Returns
Annotation name.
Value * Annotation::getValueObject ( )

This function returns annotation value.

Returns
Pointer to annotation value.
Exceptions
semantic_errorFunction will throw semantic error if hasValue() == false.
bool erpcgen::Annotation::hasValue ( )
inline

Checks to see if value instance member is null.

Return values
Trueif m_value is not null
std::string erpcgen::Annotation::toString ( )
inline

This function returns toString representation.

Returns
Returns "name = value".

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