43 "<Variable_Constructor>",
45 "<Attribute_Container>",
54 BESDEBUG(
"ncml",
"ScopeStack::Entry(): Invalid scope type = " << theType <<
" for scope name=" << theName << endl);
93 return _scope.empty();
106 vector<Entry>::const_iterator iter;
107 for(iter = _scope.begin(); iter != _scope.end(); iter++ )
109 if (iter != _scope.begin())
113 scope.append((*iter).name);
122 vector<Entry>::const_iterator iter;
123 for(iter = _scope.begin(); iter != _scope.end(); iter++ )
125 if (iter != _scope.begin())
129 scope.append((*iter).getTypedName());
137 if (_scope.empty() && type ==
GLOBAL)
141 else if (_scope.empty())
147 return (_scope.back().type == type);
158 BESDEBUG(
"ncml",
"Logic error: can't push a GLOBAL scope type, ignoring." << endl);
162 _scope.push_back(entry);
string getScopeString() const
Return a fully qualifed name for the scope, such as "" for global scope or "MetaData.Info.Name" for an attribute container, etc.
exception thrown if inernal error encountered
bool isCurrentScope(ScopeType type) const
Is the current scope of the given type? Note that isCurrentScope(GLOBAL) == empty().
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
ScopeType
The current scope is either global attribute table, within a variable's attribute table...
Entry used in Scope class to maintain where we are within the DDS AttrTable hierarchy.
string getTypedScopeString() const
Similar to getScopeString(), but appends the type of the scope to the name in the form "Name" f...
static const string sTypeStrings[NUM_SCOPE_TYPES]
const Entry & top() const
bool empty() const
If there are no entries pushed.
int size() const
How many things are on the stack.
void push(const string &name, ScopeType type)
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream