OMNeT++ Simulation Library  6.0.3
cContextSwitcher Class Reference

#include <ccontextswitcher.h>

Description

The constructor switches the context to the given component, and the destructor restores the original context.

See also
cSimulation::getContextModule(), cSimulation::setContextModule()
Inheritance diagram for cContextSwitcher:
cMethodCallContextSwitcher

Public Member Functions

 cContextSwitcher (const cComponent *newContext)
 
 ~cContextSwitcher ()
 
cComponentgetCallerContext () const
 

Constructor & Destructor Documentation

◆ cContextSwitcher()

cContextSwitcher ( const cComponent newContext)

Switches context to the given module

◆ ~cContextSwitcher()

Restores the original context

Member Function Documentation

◆ getCallerContext()

cComponent* getCallerContext ( ) const
inline

Returns the original context


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