Clara Holoscan v0.3.0
1.0

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 Fragment *fragment() const

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.

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, NVIDIA. Last updated on Jun 28, 2023.