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 DString &name_, const DString &type_, int bracketCount_)
void popScope (DString &name_, DString &type_, int &bracketCount_)
void clear ()
const ScopedTypeVariant getScope () const

Private Attributes

std::vector< Ctxm_stvList

Detailed Description

Represents the call context.

Definition at line 140 of file scopedtypevariant.h.

Constructor & Destructor Documentation

◆ CallContext()

CallContext::CallContext ( )
inline

Definition at line 152 of file scopedtypevariant.h.

153 {
154 clear();
155 }

References clear().

Member Function Documentation

◆ clear()

void CallContext::clear ( )
inline

Definition at line 176 of file scopedtypevariant.h.

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

References m_stvList.

Referenced by CallContext().

◆ getScope()

const ScopedTypeVariant CallContext::getScope ( ) const
inline

Definition at line 181 of file scopedtypevariant.h.

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

References m_stvList.

◆ popScope()

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

Definition at line 165 of file scopedtypevariant.h.

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

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

◆ pushScope()

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

Definition at line 161 of file scopedtypevariant.h.

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

References m_stvList.

◆ setScope()

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

Definition at line 156 of file scopedtypevariant.h.

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

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

Member Data Documentation

◆ m_stvList

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

Definition at line 187 of file scopedtypevariant.h.

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


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