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

> Class to define a parameter.

```cpp showLineNumbers={false}
template <typename ValueT>
class MetaParameter
```

Class to define a parameter.

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

**Template parameters**

**`ValueT`** `typename`

---

---

## Constructors

### MetaParameter \[#metaparameter]

#### Default

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::MetaParameter() = default
```

#### Copy

inline

explicit

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::MetaParameter(
    const ValueT &value
)
```

Construct a new `MetaParameter` object.

**Parameters**

**`value`** `const ValueT &`

The value of the parameter.

---

#### Move

inline

explicit

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::MetaParameter(
    ValueT &&value
)
```

Construct a new `MetaParameter` object.

**Parameters**

**`value`** `ValueT &&`

The value of the parameter.

---

#### Copy (with key and headline and description and flag)

inline

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::MetaParameter(
    const ValueT &value,
    const char *key,
    const char *headline,
    const char *description,
    ParameterFlag flag
)
```

Construct a new `MetaParameter` object.

**Parameters**

**`value`** `const ValueT &`

The value of the parameter.

---

**`key`** `const char *`

The key (name) of the parameter.

---

**`headline`** `const char *`

The headline of the parameter.

---

**`description`** `const char *`

The description of the parameter.

---

**`flag`** `ParameterFlag`

The flag of the parameter (default: ParameterFlag::kNone).

---

---

## Assignment operators

### operator= \[#operator\_assign]

#### Copy assign

```cpp showLineNumbers={false}
MetaParameter & holoscan::MetaParameter<ValueT>::operator=(
    const ValueT &value
)
```

Define the assignment operator.

**Returns:** The reference to the parameter.

**Parameters**

**`value`** `const ValueT &`

The value of the parameter.

---

#### Move assign

```cpp showLineNumbers={false}
MetaParameter & holoscan::MetaParameter<ValueT>::operator=(
    ValueT &&value
)
```

Define the assignment operator.

**Returns:** The reference to the parameter.

**Parameters**

**`value`** `ValueT &&`

The value of the parameter.

---

---

## Methods

### key \[#key]

```cpp showLineNumbers={false}
const std::string & holoscan::MetaParameter<ValueT>::key() const
```

Get the key (name) of the parameter.

**Returns:** The key (name) of the parameter.

### headline \[#headline]

```cpp showLineNumbers={false}
const std::string & holoscan::MetaParameter<ValueT>::headline() const
```

Get the headline of the parameter.

**Returns:** The headline of the parameter.

### description \[#description]

```cpp showLineNumbers={false}
const std::string & holoscan::MetaParameter<ValueT>::description() const
```

Get the description of the parameter.

**Returns:** The description of the parameter.

### flag \[#flag]

```cpp showLineNumbers={false}
const ParameterFlag & holoscan::MetaParameter<ValueT>::flag() const
```

Get the flag of the parameter.

**Returns:** The flag of the parameter.

### has\_value \[#hasvalue]

```cpp showLineNumbers={false}
bool holoscan::MetaParameter<ValueT>::has_value() const
```

Check whether the parameter contains a value.

**Returns:** true if the parameter contains a value.

### get \[#get]

#### Mutable

```cpp showLineNumbers={false}
ValueT & holoscan::MetaParameter<ValueT>::get()
```

Get the value of the parameter.

**Returns:** The reference to the value of the parameter.

#### Const

const

```cpp showLineNumbers={false}
const ValueT & holoscan::MetaParameter<ValueT>::get() const
```

### try\_get \[#tryget]

#### Mutable

```cpp showLineNumbers={false}
std::optional<ValueT> & holoscan::MetaParameter<ValueT>::try_get()
```

Try to get the value of the parameter.

Return the reference to the std::optional value of the parameter.

**Returns:** The reference to the optional value of the parameter.

#### Const

const

```cpp showLineNumbers={false}
const std::optional<ValueT> & holoscan::MetaParameter<ValueT>::try_get() const
```

### operator-> \[#operator\_arrow]

```cpp showLineNumbers={false}
template <typename PointerT = ValueT,
          typename = std::enable_if_t<holoscan::is_shared_ptr_v<PointerT> ||                                        std::is_pointer_v<PointerT>>>
holoscan::remove_pointer_t<PointerT> * holoscan::MetaParameter<ValueT>::operator->() const
```

Provides a pointer to the object managed by the shared pointer pointed to by the parameter value or dereferences the pointer.

**Returns:** The pointer to the object managed by the shared pointer pointed to by the parameter value or the dereferenced pointer.

**Template parameters**

**`PointerT`** `typename`

The type of the pointer.

---

### operator\* \[#operator\_mul]

```cpp showLineNumbers={false}
template <typename PointerT = ValueT,
          typename = std::enable_if_t<holoscan::is_shared_ptr_v<PointerT> ||                                        std::is_pointer_v<PointerT>>>
holoscan::remove_pointer_t<PointerT> & holoscan::MetaParameter<ValueT>::operator*() const
```

Provides a reference to the object managed by the shared pointer pointed to by the parameter value or dereferences the pointer.

**Returns:** The reference to the object managed by the shared pointer pointed to by the parameter value or the dereferenced pointer.

**Template parameters**

**`PointerT`** `typename`

The type of the pointer.

---

### set\_default\_value \[#setdefaultvalue]

```cpp showLineNumbers={false}
void holoscan::MetaParameter<ValueT>::set_default_value()
```

Set the default value object if the parameter does not contain a value.

### default\_value \[#defaultvalue]

#### Mutable

```cpp showLineNumbers={false}
ValueT & holoscan::MetaParameter<ValueT>::default_value()
```

Return the default value object.

**Returns:** The default value object.

#### Const

const

```cpp showLineNumbers={false}
const ValueT & holoscan::MetaParameter<ValueT>::default_value() const
```

### has\_default\_value \[#hasdefaultvalue]

```cpp showLineNumbers={false}
bool holoscan::MetaParameter<ValueT>::has_default_value() const
```

Check whether the parameter contains a default value.

**Returns:** true if the parameter contains a default value.

### operator ValueT & \[#operatorvaluet]

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::operator ValueT &()
```

Get the value of the argument.

**Returns:** The reference to the value of the parameter.

### operator const ValueT & \[#operatorconstvaluet]

```cpp showLineNumbers={false}
holoscan::MetaParameter<ValueT>::operator const ValueT &() const
```

---

## Member variables

| Name             | Type                      | Description |
| ---------------- | ------------------------- | ----------- |
| `key_`           | `std::string`             |             |
| `headline_`      | `std::string`             |             |
| `description_`   | `std::string`             |             |
| `flag_`          | `ParameterFlag`           |             |
| `value_`         | `std::optional< ValueT >` |             |
| `default_value_` | `std::optional< ValueT >` |             |