bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
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.

Constructor & Destructor Documentation

◆ ScopeStack()

ncml_module::ScopeStack::ScopeStack ( )

Definition at line 59 of file ScopeStack.cc.

◆ ~ScopeStack()

ncml_module::ScopeStack::~ScopeStack ( )
virtual

Definition at line 64 of file ScopeStack.cc.

Member Function Documentation

◆ clear()

void ncml_module::ScopeStack::clear ( )

Definition at line 70 of file ScopeStack.cc.

◆ empty()

bool ncml_module::ScopeStack::empty ( ) const

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

Definition at line 86 of file ScopeStack.cc.

◆ getFullyQualifiedName()

std::string ncml_module::ScopeStack::getFullyQualifiedName ( ) const
inline

Definition at line 114 of file ScopeStack.h.

◆ 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 96 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 109 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 122 of file ScopeStack.cc.

◆ pop()

void ncml_module::ScopeStack::pop ( )

Definition at line 75 of file ScopeStack.cc.

◆ push()

void ncml_module::ScopeStack::push ( const std::string & name,
ScopeType type )
inline

Definition at line 95 of file ScopeStack.h.

◆ 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 91 of file ScopeStack.cc.

◆ top()

const ScopeStack::Entry & ncml_module::ScopeStack::top ( ) const

Definition at line 81 of file ScopeStack.cc.

◆ topName()

const std::string & ncml_module::ScopeStack::topName ( ) const
inline

Definition at line 100 of file ScopeStack.h.

◆ topType()

ScopeType ncml_module::ScopeStack::topType ( ) const
inline

Definition at line 99 of file ScopeStack.h.


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