holoscan::Arg

Beta
View as Markdown

Class for holding the argument information.

#include <holoscan/arg.hpp>

Constructors

Arg

explicit
holoscan::Arg::Arg(
const std::string &name
)

Construct a new Arg object.

Parameters

name
const std::string &

The name of the argument.

Destructor

~Arg

holoscan::Arg::~Arg() = default

Assignment operators

operator=

template <typename ArgT,
typename = std::enable_if_t<!std::is_same_v<Arg, std::decay_t<ArgT>>>>
Arg & holoscan::Arg::operator=(
const ArgT &value
)

Define the assignment operator.

Returns: The reference to the argument.

Template parameters

ArgT
typename

The type of the argument.

Parameters

value
const ArgT &

The value of the argument.


Methods

name

void holoscan::Arg::name(
const std::string &arg_name
)

Set the name of the argument.

arg_type

const ArgType & holoscan::Arg::arg_type() const

Get the type of the argument.

Returns: The type of the argument.

has_value

bool holoscan::Arg::has_value() const

Check whether the argument contains a value.

Returns: true if the argument contains a value.

value

std::any & holoscan::Arg::value()

Get the value of the argument.

Returns: The reference to the value of the argument.

to_yaml_node

YAML::Node holoscan::Arg::to_yaml_node() const

Get a YAML representation of the argument.

Returns: YAML node including the name, type, and value of the argument.

value_to_yaml_node

YAML::Node holoscan::Arg::value_to_yaml_node() const

Get a YAML representation of the argument value.

@ return YAML node including the value of the argument.

description

std::string holoscan::Arg::description() const

Get a description of the argument.

Returns: YAML string.

See also: to_yaml_node()

set_value_

template <typename ArgT>
void holoscan::Arg::set_value_(
const ArgT &value
)

Member variables

NameTypeDescription
name_std::stringThe name of the argument.
arg_type_ArgTypeThe type of the argument.
value_std::anyThe value of the argument.