Clara Holoscan v0.3.0

Class Arg

class Arg

Class for holding the argument information.

Public Functions

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

Construct a new Arg object.

Parameters:

name – The name of the argument.

~Arg() = default

template<typename ArgT>
inline Arg &operator=(const ArgT &value)

Define the assignment operator.

Template Parameters:

ArgT – The type of the argument.

Parameters:

value – The value of the argument.

Returns:

The reference to the argument.

template<typename ArgT>
inline Arg &&operator=(ArgT &&value)

Define the assignment operator.

Template Parameters:

ArgT – The type of the argument.

Parameters:

value – The value of the argument.

Returns:

The reference to the argument.

inline const std::string &name() const

Get the name of the argument.

Returns:

The name of the argument.

inline const ArgType &arg_type() const

Get the type of the argument.

Returns:

The type of the argument.

inline bool has_value() const

Check whether the argument contains a value.

Returns:

true if the argument contains a value.

inline std::any &value()

Get the value of the argument.

Returns:

The reference to the value of the argument.

© Copyright 2022, NVIDIA. Last updated on Jun 28, 2023.