Loading...
Searching...
No Matches
Halide::Internal::ScopedBinding< T > Struct Template Reference

Helper class for pushing/popping Scope<> values, to allow for early-exit in Visitor/Mutators that preserves correctness. More...

`#include <Scope.h>`

## Public Member Functions

| ScopedBinding ()=default
| ScopedBinding (Scope< T > &s, const std::string &n, T value)
| ScopedBinding (bool condition, Scope< T > &s, const std::string &n, const T &value)
bool | bound () const
| ~ScopedBinding ()
| ScopedBinding (const ScopedBinding &that)=delete
| ScopedBinding (ScopedBinding &&that) noexcept
void | operator= (const ScopedBinding &that)=delete
void | operator= (ScopedBinding &&that)=delete

## Public Attributes

Scope< T > * | scope = nullptr
Scope< T >::PushToken | token

## Detailed Description

template<typename T = void>
struct Halide::Internal::ScopedBinding< T >

Helper class for pushing/popping Scope<> values, to allow for early-exit in Visitor/Mutators that preserves correctness.

Note that this name can be a bit confusing, since there are two "scopes" involved here:

- the Scope object itself
- the lifetime of this helper object The "Scoped" in this class name refers to the latter, as it temporarily binds a name within the scope of this helper's lifetime.

Definition at line 326 of file Scope.h.

## Constructor & Destructor Documentation

## ScopedBinding() [1/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( |  | ) |

default

Referenced by operator=(), operator=(), ScopedBinding(), and ScopedBinding().

## ScopedBinding() [2/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | Scope< T > & | s,
|  | const std::string & | n,
|  | T | value )

inline

Definition at line 332 of file Scope.h.

References scope, and token.

## ScopedBinding() [3/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | bool | condition,
|  | Scope< T > & | s,
|  | const std::string & | n,
|  | const T & | value )

inline

Definition at line 336 of file Scope.h.

References scope, and token.

## ~ScopedBinding()

template<typename T = void>

Halide::Internal::ScopedBinding< T >::~ScopedBinding | ( |  | ) |

inline

Definition at line 345 of file Scope.h.

References scope, and token.

## ScopedBinding() [4/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | const ScopedBinding< T > & | that | ) |

delete

References ScopedBinding().

## ScopedBinding() [5/5]

template<typename T = void>

Halide::Internal::ScopedBinding< T >::ScopedBinding | ( | ScopedBinding< T > && | that | ) |

inline noexcept

Definition at line 353 of file Scope.h.

References ScopedBinding().

## Member Function Documentation

## bound()

template<typename T = void>

bool Halide::Internal::ScopedBinding< T >::bound | ( |  | ) | const

inline

Definition at line 341 of file Scope.h.

References scope.

## operator=() [1/2]

template<typename T = void>

void Halide::Internal::ScopedBinding< T >::operator= | ( | const ScopedBinding< T > & | that | ) |

delete

References ScopedBinding().

## operator=() [2/2]

template<typename T = void>

void Halide::Internal::ScopedBinding< T >::operator= | ( | ScopedBinding< T > && | that | ) |

delete

References ScopedBinding().

## Member Data Documentation

## scope

template<typename T = void>

Scope<T>* Halide::Internal::ScopedBinding< T >::scope = nullptr

Definition at line 327 of file Scope.h.

Referenced by bound(), ScopedBinding(), ScopedBinding(), and ~ScopedBinding().

## token

template<typename T = void>

Scope<T>::PushToken Halide::Internal::ScopedBinding< T >::token

Definition at line 328 of file Scope.h.

Referenced by ScopedBinding(), ScopedBinding(), and ~ScopedBinding().

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

- src/Scope.h