lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
lucid::ScopedValueShield< T, Tags > Class Template Reference

A utility class that temporarily shields all current scoped values of type T and Tags. More...

#include <ScopedValue.h>

Public Member Functions

 ScopedValueShield ()
 Create a new shield instance, saving and clearing the current stack of scoped values.
 
 ~ScopedValueShield ()
 Restore the saved stack of scoped values upon destruction.
 

Private Attributes

std::vector< SavedScopedValue * > saved_scope_stack_
 Saved stack of scoped value instances.
 

Detailed Description

template<class T, class... Tags>
class lucid::ScopedValueShield< T, Tags >

A utility class that temporarily shields all current scoped values of type T and Tags.

When an instance of this class is created, it saves the current stack of scoped values and clears the stack, effectively "shielding" any existing scoped values. When the instance is destroyed, it restores the saved stack of scoped values.

Template Parameters
TType of the value to be scoped.
TagsVariadic template parameters to uniquely identify different scoped value types.

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