|
|
lucid
0.0.1
Lifting-based Uncertain Control Invariant Dynamics
|
Generic scoped value class that can hold a value of type T, while interfacing with a base class B. More...
#include <ScopedValue.h>
Public Member Functions | |
| const B & | value () const override |
| Get read-only access to the value of the current scoped value. | |
Public Member Functions inherited from lucid::BaseScopedValue< B, Tags... > | |
| BaseScopedValue () | |
| Construct a new scoped value instance and add it to the scope stack of instances. | |
| BaseScopedValue (const BaseScopedValue &) | |
| Copy constructor that adds the current instance to the scope stack of instances. | |
| virtual | ~BaseScopedValue () |
| Destructor that removes the current instance from the scope stack of instances. | |
| B & | value () |
| Get read-write access to the value of the current scoped value. | |
| void | swap (BaseScopedValue &other) noexcept |
| Swap the values of two scoped value instances. | |
| void * | operator new (std::size_t)=delete |
| Disabled standard new. | |
| void * | operator new (std::size_t, void *)=delete |
| Disabled placement new. | |
| void * | operator new[] (std::size_t)=delete |
| Disabled array new. | |
| void * | operator new[] (std::size_t, void *)=delete |
| Disabled placement array new. | |
Additional Inherited Members | |
Static Public Member Functions inherited from lucid::BaseScopedValue< B, Tags... > | |
| static BaseScopedValue * | top () |
| Get read-only access to the most recently created scoped value instance of the scope stack. | |
| static BaseScopedValue * | bottom () |
| Get read-only access to the oldest created scoped value instance of the scope stack. | |
| static const std::vector< BaseScopedValue * > & | scope_stack () |
| Get read-only access to the all scoped value instances of the scope stack. | |
| static void | set_scopes (std::vector< BaseScopedValue * > new_scopes) |
| Set the entire stack of scoped value instances. | |
Generic scoped value class that can hold a value of type T, while interfacing with a base class B.
This allows for polymorphic behavior when T is derived from B. The class maintains a stack of instances, allowing access to the most recently created (top) and the first created (bottom) instances.
| T | Type of the value to be scoped. Must be derived from B. |
| B | Base class type for polymorphic behavior. |
| Tags | Variadic template parameters to uniquely identify different scoped value types. |
|
inlineoverridevirtual |
Get read-only access to the value of the current scoped value.
Implements lucid::BaseScopedValue< B, Tags... >.