> This page is for version 5.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 5.0 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-0-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.6: https://docs.nvidia.com/holoscan/sdk-user-guide/4-6/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::PredicateInputView

> Borrow one immutable scalar sample during predicate evaluation.

```cpp showLineNumbers={false}
template <PublishedPayload T>
class PredicateInputView
```

Borrow one immutable scalar sample during predicate evaluation.

Runtime creates a view only for a selected or reused scalar input. The view owns neither the sample nor its read claim and expires with the predicate evaluation or fired activation that adopted the pinned sample. It exposes no mutable payload, endpoint, transport handle, or ownership extension.

```cpp showLineNumbers={false}
#include <holoscan/predicate_input_view.hpp>
```

**Template parameters**

**`T`** `PublishedPayload`

---

---

## Constructors

### PredicateInputView \[#predicateinputview]

#### Copy

```cpp showLineNumbers={false}
holoscan::PredicateInputView<T>::PredicateInputView(
    const PredicateInputView &other
) noexcept = default
```

Copy the same predicate-scoped immutable sample view.

**Parameters**

**`other`** `const PredicateInputView &`

View whose borrowed binding and generation evidence are copied.

---

#### Move

```cpp showLineNumbers={false}
holoscan::PredicateInputView<T>::PredicateInputView(
    PredicateInputView &&other
) noexcept = default
```

Move the predicate-scoped borrowed binding from another view.

**Parameters**

**`other`** `PredicateInputView &&`

View whose trivially borrowed binding is copied by the move.

---

#### Overload 3

inline

explicit

```cpp showLineNumbers={false}
holoscan::PredicateInputView<T>::PredicateInputView(
    detail::PredicateInputBinding<T> binding
) noexcept
```

### Destructor \[#destructor]

### \~PredicateInputView

```cpp showLineNumbers={false}
holoscan::PredicateInputView<T>::~PredicateInputView() noexcept = default
```

Destroy this view without retaining or releasing the pinned sample.

---

## Assignment operators

### operator= \[#operator_assign]

#### Copy assign

```cpp showLineNumbers={false}
PredicateInputView & holoscan::PredicateInputView<T>::operator=(
    const PredicateInputView &other
) noexcept = default
```

Replace this view with another predicate-scoped borrowed binding.

**Returns:** This view after replacement.

**Parameters**

**`other`** `const PredicateInputView &`

View whose borrowed binding and generation evidence are copied.

---

#### Move assign

```cpp showLineNumbers={false}
PredicateInputView & holoscan::PredicateInputView<T>::operator=(
    PredicateInputView &&other
) noexcept = default
```

Replace this view by moving another predicate-scoped borrowed binding.

**Returns:** This view after replacement.

**Parameters**

**`other`** `PredicateInputView &&`

View whose trivially borrowed binding is copied by the move.

---

---

## Methods

### sample \[#sample]

```cpp showLineNumbers={false}
const Sample<T> & holoscan::PredicateInputView<T>::sample() const noexcept
```

Return the pinned immutable sample.

> **Preconditions**
>
> The view's generation remains active and the binding contains a scalar sample.

**Returns:** Predicate-evaluation-scoped sample reference.

### selection \[#selection]

```cpp showLineNumbers={false}
InputSelection holoscan::PredicateInputView<T>::selection() const noexcept
```

Return the frozen selection outcome for this sample.

**Returns:** Selected or reused state and its reason.

### validate \[#validate]

```cpp showLineNumbers={false}
void holoscan::PredicateInputView<T>::validate() const noexcept
```

---

## Member variables

| Name       | Type                                 | Description |
| ---------- | ------------------------------------ | ----------- |
| `binding_` | `detail::PredicateInputBinding< T >` |             |