bes  Updated for version 3.20.6
ncml_module::ScopeStack Class Reference
Collaboration diagram for ncml_module::ScopeStack:
Collaboration graph

Classes

struct  Entry
 

Public Types

enum  ScopeType {
  GLOBAL =0, VARIABLE_ATOMIC, VARIABLE_CONSTRUCTOR, ATTRIBUTE_ATOMIC,
  ATTRIBUTE_CONTAINER, NUM_SCOPE_TYPES
}
 

Public Member Functions

void clear ()
 
bool empty () const
 
std::string getFullyQualifiedName () const
 
std::string getScopeString () const
 
std::string getTypedScopeString () const
 
bool isCurrentScope (ScopeType type) const
 
void pop ()
 
void push (const std::string &name, ScopeType type)
 
int size () const
 
const Entrytop () const
 
const std::string & topName () const
 
ScopeType topType () const
 

Detailed Description

Definition at line 53 of file ScopeStack.h.

Member Enumeration Documentation

◆ ScopeType

The current scope is either global attribute table, within a variable's attribute table, or within an attribute container. Additionally, we can be "within" an atomic attribute if the <attribute>values here</attribute> form is used.

Definition at line 60 of file ScopeStack.h.

Member Function Documentation

◆ empty()

bool ncml_module::ScopeStack::empty ( ) const

If there are no entries pushed. If empty(), we assume isCurrentScope(GLOBAL) is true.

Definition at line 84 of file ScopeStack.cc.

◆ getScopeString()

string ncml_module::ScopeStack::getScopeString ( ) const

Return a fully qualifed name for the scope, such as "" for global scope or "MetaData.Info.Name" for an attribute container, etc.

Definition at line 94 of file ScopeStack.cc.

◆ getTypedScopeString()

string ncml_module::ScopeStack::getTypedScopeString ( ) const

Similar to getScopeString(), but appends the type of the scope to the name in the form "Name<TYPE>" for better debugging. For example, "MetaData<Attribute_Container>.Info<Attribute_Container>.Name<Attribute_Atomic>" gives more information about the context.

Returns

Definition at line 107 of file ScopeStack.cc.

◆ isCurrentScope()

bool ncml_module::ScopeStack::isCurrentScope ( ScopeType  type) const

Is the current scope of the given type? Note that isCurrentScope(GLOBAL) == empty(). In other words, an empty stack implicitly means global scope.

Definition at line 120 of file ScopeStack.cc.

◆ size()

int ncml_module::ScopeStack::size ( ) const

How many things are on the stack. This is useful for knowing if an atomic attribute is being added at the top level of the DAS/DDS (which DAP2 does not allow, but DAP4 will).

Returns
The number of items on the stack.

Definition at line 89 of file ScopeStack.cc.


The documentation for this class was generated from the following files: