> This page is for version 5.0.
> For other versions, use one of these documentation indexes:
> - 5.1 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/5-1-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 5.0: https://docs.nvidia.com/holoscan/sdk-user-guide/5-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.

# holoscan::PredicateBinding

> Own one cold predicate identity, callable, optional state, config, and input list.

Own one cold predicate identity, callable, optional state, config, and input list.

Copying deep-clones the owned values. The descriptor has no runtime receiver address, plan identity, evaluator invocation API, or profile-admission authority. Compilation classifies the immutable descriptor and session construction copies or rebinds the accepted callable. Cold construction and copying may allocate and may propagate exceptions from owned values. Concurrent access is not safe when any thread mutates or replaces the binding; externally synchronize mutation and any overlapping observation.

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

---

## Constructors

### PredicateBinding \[#predicatebinding]

#### Default

```cpp showLineNumbers={false}
holoscan::PredicateBinding::PredicateBinding()
```

Construct an invalid empty binding.

#### Copy

```cpp showLineNumbers={false}
holoscan::PredicateBinding::PredicateBinding(
    const PredicateBinding &other
)
```

Deep-copy the owned cold predicate descriptor.

**Parameters**

**`other`** `const PredicateBinding &`

Descriptor to copy.

---

#### Move

noexcept

```cpp showLineNumbers={false}
holoscan::PredicateBinding::PredicateBinding(
    PredicateBinding &&other
) noexcept
```

Move the complete cold descriptor.

**Parameters**

**`other`** `PredicateBinding &&`

Descriptor whose storage is transferred.

---

#### Overload 4

```cpp showLineNumbers={false}
holoscan::PredicateBinding::PredicateBinding(
    std::string name,
    std::optional<SemanticVersion> version,
    PredicateCallableKind kind,
    bool has_state,
    bool has_config,
    bool expects_driver,
    bool callable_noexcept,
    bool callable_returns_expected,
    std::size_t callable_size,
    std::size_t callable_alignment,
    std::size_t state_size,
    std::size_t state_alignment,
    std::size_t config_size,
    std::size_t config_alignment,
    bool config_identity_available,
    std::string config_schema,
    std::string config_digest,
    const void *driver_type_token,
    std::vector<std::string> input_names,
    std::vector<const void *> input_type_tokens,
    std::unique_ptr<detail::PredicateCallableStorage> storage
)
```

### Destructor \[#destructor]

### \~PredicateBinding

```cpp showLineNumbers={false}
holoscan::PredicateBinding::~PredicateBinding()
```

Destroy all owned cold callable, state, and config values.

---

## Assignment operators

### operator= \[#operator_assign]

#### Copy assign

```cpp showLineNumbers={false}
PredicateBinding & holoscan::PredicateBinding::operator=(
    const PredicateBinding &other
)
```

Replace this descriptor with a deep copy.

**Returns:** This descriptor after replacement.

**Parameters**

**`other`** `const PredicateBinding &`

Descriptor to copy.

---

#### Move assign

noexcept

```cpp showLineNumbers={false}
PredicateBinding & holoscan::PredicateBinding::operator=(
    PredicateBinding &&other
) noexcept
```

Replace this descriptor by moving another descriptor.

**Returns:** This descriptor after replacement.

**Parameters**

**`other`** `PredicateBinding &&`

Descriptor whose storage is transferred.

---

---

## Methods

### operator bool \[#operatorbool]

```cpp showLineNumbers={false}
holoscan::PredicateBinding::operator bool() const noexcept
```

Return whether this descriptor contains a callable and valid identity.

**Returns:** `true` for a factory-created binding.

### name \[#name]

```cpp showLineNumbers={false}
std::string_view holoscan::PredicateBinding::name() const noexcept
```

Return the copied local or qualified predicate name.

**Returns:** Borrowed view valid until this binding is modified or destroyed.

### callable_kind \[#callablekind]

```cpp showLineNumbers={false}
PredicateCallableKind holoscan::PredicateBinding::callable_kind() const noexcept
```

Return the cold callable classification.

**Returns:** Function, owned-functor, or explicit type-erased category.

### has_config \[#hasconfig]

```cpp showLineNumbers={false}
bool holoscan::PredicateBinding::has_config() const noexcept
```

Return whether an explicit config value is owned.

**Returns:** `true` only for a config-bearing factory overload.

### input_count \[#inputcount]

```cpp showLineNumbers={false}
std::size_t holoscan::PredicateBinding::input_count() const noexcept
```

Return the number of declared additional predicate inputs.

**Returns:** Finite cold descriptor count.

### expects_driver \[#expectsdriver]

```cpp showLineNumbers={false}
bool holoscan::PredicateBinding::expects_driver() const noexcept
```

---

## Member variables

| Name    | Type                      | Description |
| ------- | ------------------------- | ----------- |
| `impl_` | `std::unique_ptr< Impl >` |             |