Doxygen
Loading...
Searching...
No Matches
AccessStack Class Reference

Helper class representing the stack of items considered while resolving the scope. More...

Classes

struct  AccessElem
 Element in the stack. More...
 

Public Member Functions

void push (const Definition *scope, const FileDef *fileScope, const Definition *item)
 
void push (const Definition *scope, const FileDef *fileScope, const Definition *item, const QCString &expScope)
 
void pop ()
 
bool find (const Definition *scope, const FileDef *fileScope, const Definition *item)
 
bool find (const Definition *scope, const FileDef *fileScope, const Definition *item, const QCString &expScope)
 
void clear ()
 

Private Attributes

std::vector< AccessElemm_elements
 

Detailed Description

Helper class representing the stack of items considered while resolving the scope.

Definition at line 49 of file symbolresolver.cpp.

Member Function Documentation

◆ clear()

void AccessStack::clear ( )
inline

Definition at line 86 of file symbolresolver.cpp.

87 {
88 m_elements.clear();
89 }
std::vector< AccessElem > m_elements

References m_elements.

◆ find() [1/2]

bool AccessStack::find ( const Definition * scope,
const FileDef * fileScope,
const Definition * item )
inline

Definition at line 74 of file symbolresolver.cpp.

75 {
76 auto it = std::find_if(m_elements.begin(),m_elements.end(),
77 [&](const AccessElem &e) { return e.scope==scope && e.fileScope==fileScope && e.item==item; });
78 return it!=m_elements.end();
79 }
Element in the stack.

References m_elements.

Referenced by SymbolResolver::Private::isAccessibleFrom(), and SymbolResolver::Private::isAccessibleFromWithExpScope().

◆ find() [2/2]

bool AccessStack::find ( const Definition * scope,
const FileDef * fileScope,
const Definition * item,
const QCString & expScope )
inline

Definition at line 80 of file symbolresolver.cpp.

81 {
82 auto it = std::find_if(m_elements.begin(),m_elements.end(),
83 [&](const AccessElem &e) { return e.scope==scope && e.fileScope==fileScope && e.item==item && e.expScope==expScope; });
84 return it!=m_elements.end();
85 }

References m_elements.

◆ pop()

void AccessStack::pop ( )
inline

Definition at line 70 of file symbolresolver.cpp.

71 {
72 if (!m_elements.empty()) m_elements.pop_back();
73 }

References m_elements.

Referenced by SymbolResolver::Private::isAccessibleFrom(), and SymbolResolver::Private::isAccessibleFromWithExpScope().

◆ push() [1/2]

void AccessStack::push ( const Definition * scope,
const FileDef * fileScope,
const Definition * item )
inline

Definition at line 62 of file symbolresolver.cpp.

63 {
64 m_elements.emplace_back(scope,fileScope,item);
65 }

References m_elements.

Referenced by SymbolResolver::Private::isAccessibleFrom(), and SymbolResolver::Private::isAccessibleFromWithExpScope().

◆ push() [2/2]

void AccessStack::push ( const Definition * scope,
const FileDef * fileScope,
const Definition * item,
const QCString & expScope )
inline

Definition at line 66 of file symbolresolver.cpp.

67 {
68 m_elements.emplace_back(scope,fileScope,item,expScope);
69 }

References m_elements.

Member Data Documentation

◆ m_elements

std::vector<AccessElem> AccessStack::m_elements
private

Definition at line 92 of file symbolresolver.cpp.

Referenced by clear(), find(), find(), pop(), push(), and push().


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