36 #ifndef _EMBEDDED_RPC__SYMBOLSCOPE_H_ 37 #define _EMBEDDED_RPC__SYMBOLSCOPE_H_ 62 typedef symbol_vector_t::iterator vit;
63 typedef vit::value_type value_type;
65 operator value_type &() {
return *m_vec; }
66 value_type &operator*() {
return *m_vec; }
67 value_type &operator->() {
return *m_vec; }
74 bool operator==(
const typed_iterator &other) {
return (m_vec == other.m_vec); }
75 bool operator!=(
const typed_iterator &other) {
return !(*
this == other); }
78 symbol_vector_t::iterator m_vec;
79 symbol_vector_t::iterator m_endvec;
124 bool hasSymbol(
const std::string &name,
bool recursive =
true);
284 #endif // _EMBEDDED_RPC__SYMBOLSCOPE_H_ symbol_vector_t::iterator end()
Return end of symbol vector.
Definition: SymbolScope.h:220
void replaceSymbol(Symbol *oldSym, Symbol *newSym)
This function will replace old symbol with new symbol in the symbol scope.
Definition: Type.cpp:250
typed_iterator tend(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:172
void addSymbol(Symbol *sym, int32_t pos=-1)
This function will add symbol to the symbol scope.
Definition: Type.cpp:217
virtual ~SymbolScope()
Destructor.
Definition: SymbolScope.h:107
Symbol * getSymbol(const std::string &name, bool recursive=true)
This function will return symbol.
Definition: Type.cpp:200
bool hasParent() const
Return boolean representation about existence of parent.
Definition: SymbolScope.h:192
void clear()
Erase data from m_symbolMap and m_symbolVector.
Definition: Type.cpp:288
Base class for all named declarations in the IDL.
Definition: Symbol.h:53
symbol_vector_t::iterator begin()
Return begin of symbol vector.
Definition: SymbolScope.h:213
symbol_vector_t m_symbolVector
Definition: SymbolScope.h:278
void setParent(SymbolScope *parent)
This function set parent for this object.
Definition: SymbolScope.h:206
SymbolScope()
Constructor.
Definition: SymbolScope.h:97
symbol_vector_t getSymbolsOfType(Symbol::symbol_type_t predicateType)
This function returns symbol vector with symbols.
Definition: Type.cpp:177
typed_iterator tbegin(Symbol::symbol_type_t predicateType)
Definition: Type.cpp:167
bool hasSymbol(const std::string &name, bool recursive=true)
This function returns true when name is found in symbol map.
Definition: Type.cpp:190
A scoped namespace containing symbols.
Definition: SymbolScope.h:53
std::vector< Symbol * > symbol_vector_t
Definition: SymbolScope.h:57
SymbolScope * getParent()
Return pointer to parent.
Definition: SymbolScope.h:199
Definition: SymbolScope.h:59
symbol_vector_t getSymbolVector()
This function returns symbol vector.
Definition: SymbolScope.h:253
symbol_map_t m_symbolMap
Definition: SymbolScope.h:277
int32_t getSymbolPos(Symbol *sym)
This function will return symbol position.
Definition: Type.cpp:266
void dump()
This function show debug description about the all symbols.
Definition: Type.cpp:278
SymbolScope * m_parent
Definition: SymbolScope.h:279
symbol_type_t
Supported symbol types.
Definition: Symbol.h:59
std::map< std::string, Symbol * > symbol_map_t
Definition: SymbolScope.h:56