Autowiring  1.0.3
A C++ Inversion of Control Framework
CurrentContextPusher Class Reference

Saves the current context and makes the passed one current, and then restores the current context when destroyed More...

#include <CurrentContextPusher.h>

Public Member Functions

 CurrentContextPusher (void)
 Saves the current context, to be restored on destruction More...
 
std::shared_ptr< CoreContextPop (void)
 Provides the caller with a way to set the prior context current prior to the destruction of this instance More...
 

Detailed Description

Saves the current context and makes the passed one current, and then restores the current context when destroyed

Examples:
AutoNetExample.cpp, and ContextExample.cpp.

Constructor & Destructor Documentation

CurrentContextPusher::CurrentContextPusher ( void  )

Saves the current context, to be restored on destruction

Member Function Documentation

std::shared_ptr<CoreContext> CurrentContextPusher::Pop ( void  )

Provides the caller with a way to set the prior context current prior to the destruction of this instance

Returns
A reference to the context that was previously current

This method is idempotent


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