# cContextSwitcher Class Reference
[Internal classes]

`#include <util.h>`

List of all members.

## Detailed Description

Helper class, used internally by the Enter_Method() and Enter_Method_Silent() macros.

The macro should be put at the top of module methods that may be called from other modules, and it creates an instance of this class. The constructor switches the context to the module containing the method, and the destructor restores the original context.

See also:
  cSimulation::contextModule(), cSimulation::setContextModule()

## Public Member Functions

| cContextSwitcher (cModule *thisptr)
| ~cContextSwitcher ()
void | methodCall (const char *fmt,...)

## Constructor & Destructor Documentation

cContextSwitcher::cContextSwitcher | ( | cModule * | thisptr | ) |

| Switches context to the given module.

cContextSwitcher::~cContextSwitcher | ( |  | ) |

| Restores the original context.

## Member Function Documentation

void cContextSwitcher::methodCall | ( | const char * | fmt,
|  |  | ...
| ) |

| Tells the user interface about the method call (so that it can be animated, etc. )

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

- util.h