10 #ifndef _EMBEDDED_RPC__SYMBOL_H_ 11 #define _EMBEDDED_RPC__SYMBOL_H_ 13 #include "Annotation.hpp" 14 #include "AstNode.hpp" 43 kUnionCaseMemberSymbol
91 ,
m_name(tok.getStringValue())
256 std::vector<Annotation *>
getAnnotations(
const std::string &name, Annotation::program_lang_t lang);
273 Value *
getAnnValue(
const std::string &annName, Annotation::program_lang_t lang);
283 std::string
getAnnStringValue(
const std::string &annName, Annotation::program_lang_t lang);
324 #endif // _EMBEDDED_RPC__SYMBOL_H_ std::string printAnnotations()
This function returns description about annotation.
Definition: Type.cpp:63
Annotation class.
Definition: Annotation.hpp:28
bool isConstSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:131
std::string getMlComment()
This function returns multiline comment for this symbol declared in IDL file.
Definition: Symbol.hpp:290
Symbol(symbol_type_t symType)
Constructor.
Definition: Symbol.hpp:53
std::string m_ilComment
Definition: Symbol.hpp:319
int getFirstLine() const
This function return first line from location of symbol.
Definition: Symbol.hpp:208
int m_lastLine
Definition: Token.hpp:29
Value * getAnnValue(const std::string &annName, Annotation::program_lang_t lang)
This function search and returns Value object for given annotation name.
Definition: Type.cpp:110
const std::vector< Annotation > & getAnnotations() const
Return all Symbol annotations.
Definition: Symbol.hpp:263
bool isStructMemberSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:171
bool isDatatypeSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:179
std::string m_name
Definition: Symbol.hpp:315
bool isUnionCaseSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:187
Symbol(symbol_type_t symType, const Token &tok)
Constructor.
Definition: Symbol.hpp:89
int m_firstLine
Definition: Token.hpp:27
void setLocation(const token_loc_t &loc)
This function set location for symbol.
Definition: Symbol.hpp:201
Base class for all named declarations in the IDL.
Definition: Symbol.hpp:28
token_loc_t & getLocation()
This function returns location for symbol.
Definition: Symbol.hpp:194
Annotation * findAnnotation(const std::string &name, Annotation::program_lang_t lang)
Find annotation in the annotation list.
Definition: Type.cpp:83
symbol_type_t m_symbolType
Definition: Symbol.hpp:314
void setIlComment(const std::string &comment)
This function set inline comment for this symbol declared in IDL file.
Definition: Symbol.hpp:311
Abstract base class for values of arbitrary types.
Definition: Value.hpp:27
bool isInterfaceSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:155
std::vector< Annotation > m_annotations
Definition: Symbol.hpp:317
std::string getIlComment()
This function returns inline comment for this symbol declared in IDL file.
Definition: Symbol.hpp:304
token_loc_t m_location
Definition: Symbol.hpp:316
std::string m_mlComment
Definition: Symbol.hpp:318
const std::string & getName() const
This function returns symbol name.
Definition: Symbol.hpp:116
Encapsulates all information about a token.
Definition: Token.hpp:60
virtual std::string getDescription() const
This function returns description about the symbol (symbol name).
Definition: Symbol.hpp:222
int getLastLine() const
This function return last line from location of symbol.
Definition: Symbol.hpp:215
bool isProgramSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:163
symbol_type_t getSymbolType() const
This function returns symbol type.
Definition: Symbol.hpp:109
void setName(const std::string &newName)
This function set symbol name.
Definition: Symbol.hpp:123
void setMlComment(const std::string &comment)
This function set multiline comment for this symbol declared in IDL file.
Definition: Symbol.hpp:297
virtual ~Symbol()
Destructor.
Definition: Symbol.hpp:102
Token location in the source file.
Definition: Token.hpp:25
std::string getAnnStringValue(const std::string &annName, Annotation::program_lang_t lang)
This function search and returns string for given annotation name.
Definition: Type.cpp:116
void addAnnotation(const Annotation &a)
This function add annotation to vector of symbol annotations.
Definition: Symbol.hpp:229
symbol_type_t
Supported symbol types.
Definition: Symbol.hpp:34
bool isFunctionSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:147
Definition: AstNode.hpp:26
Symbol(symbol_type_t symType, const std::string &name)
Constructor.
Definition: Symbol.hpp:71
bool isEnumMemberSymbol() const
This function is testing symbol type.
Definition: Symbol.hpp:139