30 #ifndef __NCML_MODULE__SCOPE_STACK_H__
31 #define __NCML_MODULE__SCOPE_STACK_H__
60 enum ScopeType { GLOBAL=0, VARIABLE_ATOMIC, VARIABLE_CONSTRUCTOR, ATTRIBUTE_ATOMIC, ATTRIBUTE_CONTAINER, NUM_SCOPE_TYPES};
71 Entry() : type(GLOBAL) , name(
"") {}
73 std::string getTypedName()
const
75 return name + toString(type);
78 static const std::string& toString(
ScopeType theType)
80 return sTypeStrings[theType];
85 static const std::string sTypeStrings[NUM_SCOPE_TYPES];
95 void push(
const std::string& name,
ScopeType type) { push(
Entry(type, name)); }
97 const Entry& top()
const;
99 ScopeType topType()
const {
return top().type; }
100 const std::string& topName()
const {
return top().name; }
114 std::string getFullyQualifiedName()
const {
return getScopeString(); }
139 void push(
const Entry& entry);
143 std::vector<Entry> _scope;