OMNeT++ API 6.1
Discrete Event Simulation Library
cContextSwitcher Class Reference

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:
[legend]

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: