Class ComponentSpec
Defined in File component_spec.hpp
Derived Type
public holoscan::OperatorSpec
(Class OperatorSpec)
-
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> ¶meter, const char *key) Define a parameter for this component.
- Template Parameters
- Parameters
parameter – The parameter to define.
key – The key (name) of the parameter.
typeT – The type of the parameter.
-
template<typename typeT>
inline void param(Parameter<typeT> ¶meter, const char *key, const char *headline) Define a parameter for this component.
- Template Parameters
- Parameters
parameter – The parameter to define.
key – The key (name) of the parameter.
headline – The headline of the parameter.
typeT – The type of the parameter.
-
template<typename typeT>
void param(Parameter<typeT> ¶meter, const char *key, const char *headline, const char *description) Define a parameter for this component.
- Template Parameters
- 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.
typeT – The type of the parameter.
-
template<typename typeT>
void param(Parameter<typeT> ¶meter, const char *key, const char *headline, const char *description, typeT default_value) Define a parameter that has a default value.
- Template Parameters
- 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.
typeT – The type of the parameter.
-
inline std::unordered_map<std::string, ParameterWrapper> ¶ms()
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.
-
inline explicit ComponentSpec(Fragment *fragment = nullptr)