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

Represents the call context. More...

#include <src/scopedtypevariant.h>

Classes

struct  Ctx
 

Public Member Functions

 CallContext ()
 
void setScope (const ScopedTypeVariant &stv)
 
void pushScope (const QCString &name_, const QCString &type_, int bracketCount_)
 
void popScope (QCString &name_, QCString &type_, int &bracketCount_)
 
void clear ()
 
const ScopedTypeVariant getScope () const
 

Private Attributes

std::vector< Ctxm_stvList
 

Detailed Description

Represents the call context.

Definition at line 139 of file scopedtypevariant.h.

Constructor & Destructor Documentation

◆ CallContext()

CallContext::CallContext ( )
inline

Definition at line 151 of file scopedtypevariant.h.

152 {
153 clear();
154 }

References clear().

Member Function Documentation

◆ clear()

void CallContext::clear ( )
inline

Definition at line 175 of file scopedtypevariant.h.

176 {
177 m_stvList.clear();
178 m_stvList.emplace_back(QCString(),QCString(),0);
179 }
std::vector< Ctx > m_stvList

References m_stvList.

Referenced by CallContext().

◆ getScope()

const ScopedTypeVariant CallContext::getScope ( ) const
inline

Definition at line 180 of file scopedtypevariant.h.

181 {
182 return m_stvList.back().stv;
183 }

References m_stvList.

◆ popScope()

void CallContext::popScope ( QCString & name_,
QCString & type_,
int & bracketCount_ )
inline

Definition at line 164 of file scopedtypevariant.h.

165 {
166 if (m_stvList.size()>1)
167 {
168 const Ctx &ctx = m_stvList.back();
169 name_ = ctx.name;
170 type_ = ctx.type;
171 bracketCount_ = ctx.bracketCount;
172 m_stvList.pop_back();
173 }
174 }

References CallContext::Ctx::bracketCount, m_stvList, CallContext::Ctx::name, and CallContext::Ctx::type.

◆ pushScope()

void CallContext::pushScope ( const QCString & name_,
const QCString & type_,
int bracketCount_ )
inline

Definition at line 160 of file scopedtypevariant.h.

161 {
162 m_stvList.emplace_back(name_,type_,bracketCount_);
163 }

References m_stvList.

◆ setScope()

void CallContext::setScope ( const ScopedTypeVariant & stv)
inline

Definition at line 155 of file scopedtypevariant.h.

156 {
157 Ctx &ctx = m_stvList.back();
158 ctx.stv=stv;
159 }

References m_stvList, and CallContext::Ctx::stv.

Member Data Documentation

◆ m_stvList

std::vector<Ctx> CallContext::m_stvList
private

Definition at line 186 of file scopedtypevariant.h.

Referenced by clear(), getScope(), popScope(), pushScope(), and setScope().


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