holoscan::MetaParameter

Beta
View as Markdown
template <typename ValueT>
class MetaParameter

Class to define a parameter.

#include <holoscan/parameter.hpp>

Template parameters

ValueT
typename

Constructors

MetaParameter

holoscan::MetaParameter<ValueT>::MetaParameter() = default

Assignment operators

operator=

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.


Methods

key

const std::string & holoscan::MetaParameter<ValueT>::key() const

Get the key (name) of the parameter.

Returns: The key (name) of the parameter.

headline

const std::string & holoscan::MetaParameter<ValueT>::headline() const

Get the headline of the parameter.

Returns: The headline of the parameter.

description

const std::string & holoscan::MetaParameter<ValueT>::description() const

Get the description of the parameter.

Returns: The description of the parameter.

flag

const ParameterFlag & holoscan::MetaParameter<ValueT>::flag() const

Get the flag of the parameter.

Returns: The flag of the parameter.

has_value

bool holoscan::MetaParameter<ValueT>::has_value() const

Check whether the parameter contains a value.

Returns: true if the parameter contains a value.

get

ValueT & holoscan::MetaParameter<ValueT>::get()

Get the value of the parameter.

Returns: The reference to the value of the parameter.

try_get

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.

operator->

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*

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

void holoscan::MetaParameter<ValueT>::set_default_value()

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

default_value

ValueT & holoscan::MetaParameter<ValueT>::default_value()

Return the default value object.

Returns: The default value object.

has_default_value

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 &

holoscan::MetaParameter<ValueT>::operator ValueT &()

Get the value of the argument.

Returns: The reference to the value of the parameter.

operator const ValueT &

holoscan::MetaParameter<ValueT>::operator const ValueT &() const

Member variables

NameTypeDescription
key_std::string
headline_std::string
description_std::string
flag_ParameterFlag
value_std::optional< ValueT >
default_value_std::optional< ValueT >