NVIDIA Holoscan SDK v0.5.1
v0.5.1

Class ComponentSpec

class ComponentSpec

Class to define the specification of a component.

Subclassed by holoscan::OperatorSpec

Public Functions

inline explicit ComponentSpec(Fragment *fragment = nullptr)

Construct a new ComponentSpec object.

Parameters

fragment – The pointer to the fragment that contains this component.

inline void fragment(Fragment *fragment)

Set the pointer to the fragment that contains this component.

Parameters

fragment – The pointer to the fragment that contains this component.

inline Fragment *fragment()

Get the pointer to the fragment that contains this component.

Returns

The pointer to the fragment that contains this component.

template<typename typeT>
inline void param(Parameter<typeT> &parameter, const char *key)

Define a parameter for this component.

Template Parameters

typeT – The type of the parameter.

Parameters
  • parameter – The parameter to define.

  • key – The key (name) of the parameter.

template<typename typeT>
inline void param(Parameter<typeT> &parameter, const char *key, const char *headline)

Define a parameter for this component.

Template Parameters

typeT – The type of the parameter.

Parameters
  • parameter – The parameter to define.

  • key – The key (name) of the parameter.

  • headline – The headline of the parameter.

template<typename typeT>
void param(Parameter<typeT> &parameter, const char *key, const char *headline, const char *description)

Define a parameter for this component.

Template Parameters

typeT – The type of the parameter.

Parameters
  • parameter – The parameter to define.

  • key – The key (name) of the parameter.

  • headline – The headline of the parameter.

  • description – The description of the parameter.

template<typename typeT>
void param(Parameter<typeT> &parameter, const char *key, const char *headline, const char *description, typeT default_value)

Define a parameter that has a default value.

Template Parameters

typeT – The type of the parameter.

Parameters
  • parameter – The parameter to get.

  • key – The key (name) of the parameter.

  • headline – The headline of the parameter.

  • description – The description of the parameter.

  • default_value – The default value of the parameter.

inline std::unordered_map<std::string, ParameterWrapper> &params()

Get the parameters of this component.

Returns

The reference to the parameters of this component.

virtual YAML::Node to_yaml_node() const

Get a YAML representation of the component spec.

Returns

YAML node including the parameters of this component.

std::string description() const

Get a description of the component spec.

See also

Returns

YAML string.

Protected Attributes

Fragment *fragment_ = nullptr

The pointer to the fragment that contains this component.

std::unordered_map<std::string, ParameterWrapper> params_

The parameters of this component.

© Copyright 2022-2023, NVIDIA. Last updated on Jul 28, 2023.