Classes | Public Member Functions | Private Attributes | List of all members
CallContext Class Reference

Classes

struct  Ctx
 

Public Member Functions

 CallContext ()
 
virtual ~CallContext ()
 
void setScope (Definition *d)
 
void pushScope ()
 
void popScope ()
 
void clear ()
 
DefinitiongetScope () const
 

Private Attributes

QList< Ctxm_defList
 

Detailed Description

Definition at line 10865 of file code.cpp.

Constructor & Destructor Documentation

CallContext::CallContext ( )
inline

Definition at line 10876 of file code.cpp.

10877  {
10878  m_defList.append(new Ctx);
10879  m_defList.setAutoDelete(TRUE);
10880  }
QList< Ctx > m_defList
Definition: code.cpp:10927
const bool TRUE
Definition: qglobal.h:371
virtual CallContext::~CallContext ( )
inlinevirtual

Definition at line 10881 of file code.cpp.

10881 {}

Member Function Documentation

void CallContext::clear ( )
inline

Definition at line 10914 of file code.cpp.

10915  {
10916  DBG_CTX((stderr,"** Clear call context\n"));
10917  m_defList.clear();
10918  m_defList.append(new Ctx);
10919  }
QList< Ctx > m_defList
Definition: code.cpp:10927
#define DBG_CTX(x)
Definition: code.cpp:10585
Definition* CallContext::getScope ( ) const
inline

Definition at line 10920 of file code.cpp.

10921  {
10922  Ctx *ctx = m_defList.getLast();
10923  if (ctx) return ctx->d; else return 0;
10924  }
QList< Ctx > m_defList
Definition: code.cpp:10927
void CallContext::popScope ( )
inline

Definition at line 10896 of file code.cpp.

10897  {
10898  if (m_defList.count()>1)
10899  {
10900  DBG_CTX((stderr,"** Pop call context %d\n",m_defList.count()));
10901  Ctx *ctx = m_defList.getLast();
10902  if (ctx)
10903  {
10904  g_name = ctx->name;
10905  g_type = ctx->type;
10906  }
10907  m_defList.removeLast();
10908  }
10909  else
10910  {
10911  DBG_CTX((stderr,"** ILLEGAL: Pop call context\n"));
10912  }
10913  }
QList< Ctx > m_defList
Definition: code.cpp:10927
static QCString g_name
Definition: code.cpp:10619
#define DBG_CTX(x)
Definition: code.cpp:10585
static QCString g_type
Definition: code.cpp:10618
void CallContext::pushScope ( )
inline

Definition at line 10891 of file code.cpp.

10892  {
10893  m_defList.append(new Ctx);
10894  DBG_CTX((stderr,"** Push call context %d\n",m_defList.count()));
10895  }
QList< Ctx > m_defList
Definition: code.cpp:10927
#define DBG_CTX(x)
Definition: code.cpp:10585
void CallContext::setScope ( Definition d)
inline

Definition at line 10882 of file code.cpp.

10883  {
10884  Ctx *ctx = m_defList.getLast();
10885  if (ctx)
10886  {
10887  DBG_CTX((stderr,"** Set call context %s (%p)\n",d==0 ? "<null>" : d->name().data(),d));
10888  ctx->d=d;
10889  }
10890  }
const QCString & name() const
Definition: definition.h:114
QList< Ctx > m_defList
Definition: code.cpp:10927
const char * data() const
Definition: qcstring.h:207
#define DBG_CTX(x)
Definition: code.cpp:10585

Member Data Documentation

QList<Ctx> CallContext::m_defList
private

Definition at line 10927 of file code.cpp.


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