kexi

KoMacro::Context Class Reference

#include <context.h>

Public Slots

virtual void activate (TDESharedPtr< Context > context)
virtual void activateNext ()

Public Member Functions

 Context (TDESharedPtr< Macro > macro)
 ~Context ()
bool hasVariable (const TQString &name) const
TDESharedPtr< Variable > variable (const TQString &name) const
Variable::Map variables () const
void setVariable (const TQString &name, TDESharedPtr< Variable > variable)
TDESharedPtr< Macro > macro () const
TDESharedPtr< MacroItem > macroItem () const
bool hadException () const
Exception * exception () const

Detailed Description

The context of an execution.

If a Macro got executed it creates an instance of this class and passes it around all it's children as local execution context.

Definition at line 41 of file context.h.

Constructor & Destructor Documentation

◆ Context()

Context::Context ( TDESharedPtr< Macro > macro)
explicit

Constructor.

Parameters
macroThe Macro this Context belongs to.

Definition at line 87 of file context.cpp.

◆ ~Context()

Context::~Context ( )

Destructor.

Definition at line 94 of file context.cpp.

Member Function Documentation

◆ activate

void Context::activate ( TDESharedPtr< Context > context)
virtualslot

This slot extends the slot above with the passed Context context which will be used as parent context for this context.

Definition at line 220 of file context.cpp.

◆ activateNext

void Context::activateNext ( )
virtualslot

This slot continues execution.

Definition at line 244 of file context.cpp.

◆ exception()

Exception * Context::exception ( ) const
Returns
the Exception instance that was thrown on the last call of activate() . If there was no exception NULL is returned.

Definition at line 159 of file context.cpp.

◆ hadException()

bool Context::hadException ( ) const
Returns
true if the last activate() stopped with an exception else false is returned.

Definition at line 153 of file context.cpp.

◆ hasVariable()

bool Context::hasVariable ( const TQString & name) const
Returns
true if there exists a variable with name name else false got returned.

Definition at line 100 of file context.cpp.

◆ macro()

TDESharedPtr< Macro > Context::macro ( ) const
Returns
the associated macro

Definition at line 141 of file context.cpp.

◆ macroItem()

TDESharedPtr< MacroItem > Context::macroItem ( ) const
Returns
the currently selected MacroItem instance or NULL if there is no MacroItem selected yet.

Definition at line 147 of file context.cpp.

◆ setVariable()

void Context::setVariable ( const TQString & name,
TDESharedPtr< Variable > variable )

Set the variable variable defined with name name .

If there exists already a variable with that name replace it.

Definition at line 132 of file context.cpp.

◆ variable()

TDESharedPtr< Variable > Context::variable ( const TQString & name) const
Returns
the Variable defined with name name or NULL if there exists no such variable.

Definition at line 107 of file context.cpp.

◆ variables()

Variable::Map Context::variables ( ) const
Returns
a map of all Variable instance that are defined within this context.

Definition at line 126 of file context.cpp.


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