10 #ifndef _EMBEDDED_RPC__SYMBOLSCOPE_H_ 11 #define _EMBEDDED_RPC__SYMBOLSCOPE_H_ 36 typedef symbol_vector_t::iterator vit;
37 typedef vit::value_type value_type;
39 operator value_type &() {
return *m_vec; }
40 value_type &operator*() {
return *m_vec; }
41 value_type &operator->() {
return *m_vec; }
48 bool operator==(
const typed_iterator &other) {
return (m_vec == other.m_vec); }
49 bool operator!=(
const typed_iterator &other) {
return !(*
this == other); }
52 symbol_vector_t::iterator m_vec;
53 symbol_vector_t::iterator m_endvec;
98 bool hasSymbol(
const std::string &name,
bool recursive =
true);
258 #endif // _EMBEDDED_RPC__SYMBOLSCOPE_H_ symbol_vector_t::iterator end()
Return end of symbol vector.
Definition: SymbolScope.h:194
void replaceSymbol(Symbol *oldSym, Symbol *newSym)
This function will replace old symbol with new symbol in the symbol scope.
Definition: Type.cpp:224
typed_iterator tend(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:146
void addSymbol(Symbol *sym, int32_t pos=-1)
This function will add symbol to the symbol scope.
Definition: Type.cpp:191
virtual ~SymbolScope()
Destructor.
Definition: SymbolScope.h:81
Symbol * getSymbol(const std::string &name, bool recursive=true)
This function will return symbol.
Definition: Type.cpp:174
bool hasParent() const
Return boolean representation about existence of parent.
Definition: SymbolScope.h:166
void clear()
Erase data from m_symbolMap and m_symbolVector.
Definition: Type.cpp:262
Base class for all named declarations in the IDL.
Definition: Symbol.h:27
symbol_vector_t::iterator begin()
Return begin of symbol vector.
Definition: SymbolScope.h:187
symbol_vector_t m_symbolVector
Definition: SymbolScope.h:252
void setParent(SymbolScope *parent)
This function set parent for this object.
Definition: SymbolScope.h:180
SymbolScope()
Constructor.
Definition: SymbolScope.h:71
symbol_vector_t getSymbolsOfType(Symbol::symbol_type_t predicateType)
This function returns symbol vector with symbols.
Definition: Type.cpp:151
typed_iterator tbegin(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:141
bool hasSymbol(const std::string &name, bool recursive=true)
This function returns true when name is found in symbol map.
Definition: Type.cpp:164
A scoped namespace containing symbols.
Definition: SymbolScope.h:27
std::vector< Symbol * > symbol_vector_t
Definition: SymbolScope.h:31
SymbolScope * getParent()
Return pointer to parent.
Definition: SymbolScope.h:173
Definition: SymbolScope.h:33
symbol_vector_t getSymbolVector()
This function returns symbol vector.
Definition: SymbolScope.h:227
symbol_map_t m_symbolMap
Definition: SymbolScope.h:251
int32_t getSymbolPos(Symbol *sym)
This function will return symbol position.
Definition: Type.cpp:240
void dump()
This function show debug description about the all symbols.
Definition: Type.cpp:252
SymbolScope * m_parent
Definition: SymbolScope.h:253
symbol_type_t
Supported symbol types.
Definition: Symbol.h:33
std::map< std::string, Symbol * > symbol_map_t
Definition: SymbolScope.h:30