CodeContextGuard Class Reference

#include <CodeContext.h>

Collaboration diagram for CodeContextGuard:

Public Member Functions

 CodeContextGuard (const CodeContext::Pointer &newContext)
 
 ~CodeContextGuard ()
 
 CodeContextGuard (CodeContextGuard &&)=delete
 

Public Attributes

CodeContext::Pointer savedCodeContext
 

Detailed Description

Convenience class that automatically restores the current/outer CodeContext when leaving the scope of the new-context following/inner code.

See also
Run().

Definition at line 62 of file CodeContext.h.

Constructor & Destructor Documentation

◆ CodeContextGuard() [1/2]

CodeContextGuard::CodeContextGuard ( const CodeContext::Pointer newContext)
inline

Definition at line 65 of file CodeContext.h.

References CodeContext::Reset().

◆ ~CodeContextGuard()

CodeContextGuard::~CodeContextGuard ( )
inline

Definition at line 66 of file CodeContext.h.

References CodeContext::Reset(), and savedCodeContext.

◆ CodeContextGuard() [2/2]

CodeContextGuard::CodeContextGuard ( CodeContextGuard &&  )
delete

Member Data Documentation

◆ savedCodeContext

CodeContext::Pointer CodeContextGuard::savedCodeContext

Definition at line 71 of file CodeContext.h.

Referenced by ~CodeContextGuard().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors