holoscan::ArgList
holoscan::ArgList
Vector-like container for holding the arguments.
Constructors
ArgList
Default
From initializer_list
Destructor
~ArgList
Methods
size
Get the number of arguments.
Returns: The number of arguments.
begin
Mutable
Const
Return an iterator to the beginning.
Returns: The iterator to the first element.
end
Mutable
Const
Return an iterator to the end.
Returns: The iterator to the element following the last element.
clear
Erase all elements from the container.
args
Get the vector of arguments.
Returns: The reference to the vector of arguments.
as
Get the value of the argument as a specific type.
This method takes a type as a template parameter and returns the value of the argument as that type. Only the first item in the argument list is taken into account.
If the cast fails, an error message is logged and a default value for the type is returned.
Example:
Returns: The value of the argument as the specified type.
Template parameters
The type to cast the argument to.
Example
add
Add an argument to the list (1)
Add an argument to the list (2)
Add an argument list to the list (1)
Add an argument list to the list (2)
Add an argument to the list.
Parameters
The argument to add.
name
Get the name of the argument list.
Returns: The name of the argument list.
to_yaml_node
Get a YAML representation of the argument list.
Returns: YAML node including the name, and arguments of the argument list.
description
Get a description of the argument list.
Returns: YAML string.
See also: to_yaml_node()