10 #ifndef _EMBEDDED_RPC__SYMBOLSCOPE_H_ 11 #define _EMBEDDED_RPC__SYMBOLSCOPE_H_ 37 typedef symbol_vector_t::iterator vit;
38 typedef vit::value_type value_type;
40 operator value_type &() {
return *m_vec; }
41 value_type &operator*() {
return *m_vec; }
42 value_type &operator->() {
return *m_vec; }
49 bool operator==(
const typed_iterator &other) {
return (m_vec == other.m_vec); }
50 bool operator!=(
const typed_iterator &other) {
return !(*
this == other); }
53 symbol_vector_t::iterator m_vec;
54 symbol_vector_t::iterator m_endvec;
99 bool hasSymbol(
const std::string &name,
bool recursive =
true);
259 #endif // _EMBEDDED_RPC__SYMBOLSCOPE_H_ symbol_vector_t::iterator end()
Return end of symbol vector.
Definition: SymbolScope.h:195
void replaceSymbol(Symbol *oldSym, Symbol *newSym)
This function will replace old symbol with new symbol in the symbol scope.
Definition: Type.cpp:225
typed_iterator tend(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:147
void addSymbol(Symbol *sym, int32_t pos=-1)
This function will add symbol to the symbol scope.
Definition: Type.cpp:192
virtual ~SymbolScope()
Destructor.
Definition: SymbolScope.h:82
Symbol * getSymbol(const std::string &name, bool recursive=true)
This function will return symbol.
Definition: Type.cpp:175
bool hasParent() const
Return boolean representation about existence of parent.
Definition: SymbolScope.h:167
void clear()
Erase data from m_symbolMap and m_symbolVector.
Definition: Type.cpp:263
Base class for all named declarations in the IDL.
Definition: Symbol.h:28
symbol_vector_t::iterator begin()
Return begin of symbol vector.
Definition: SymbolScope.h:188
symbol_vector_t m_symbolVector
Definition: SymbolScope.h:253
void setParent(SymbolScope *parent)
This function set parent for this object.
Definition: SymbolScope.h:181
SymbolScope()
Constructor.
Definition: SymbolScope.h:72
symbol_vector_t getSymbolsOfType(Symbol::symbol_type_t predicateType)
This function returns symbol vector with symbols.
Definition: Type.cpp:152
typed_iterator tbegin(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:142
bool hasSymbol(const std::string &name, bool recursive=true)
This function returns true when name is found in symbol map.
Definition: Type.cpp:165
A scoped namespace containing symbols.
Definition: SymbolScope.h:28
std::vector< Symbol * > symbol_vector_t
Definition: SymbolScope.h:32
SymbolScope * getParent()
Return pointer to parent.
Definition: SymbolScope.h:174
Definition: SymbolScope.h:34
symbol_vector_t getSymbolVector()
This function returns symbol vector.
Definition: SymbolScope.h:228
symbol_map_t m_symbolMap
Definition: SymbolScope.h:252
int32_t getSymbolPos(Symbol *sym)
This function will return symbol position.
Definition: Type.cpp:241
void dump()
This function show debug description about the all symbols.
Definition: Type.cpp:253
SymbolScope * m_parent
Definition: SymbolScope.h:254
symbol_type_t
Supported symbol types.
Definition: Symbol.h:34
std::map< std::string, Symbol * > symbol_map_t
Definition: SymbolScope.h:31