Class Condition

Holoscan v2.1.0

Base Type

Derived Type

class Condition : public holoscan::Component

Base class for all conditions.

A condition is a predicate that can be evaluated at runtime to determine if an operator should execute. This matches the semantics of GXF’s Scheduling Term.

Subclassed by holoscan::gxf::GXFCondition

Public Functions

Condition() = default
Condition(Condition&&) = default
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Condition, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>
inline explicit Condition(ArgT &&arg, ArgsT&&... args)
~Condition() override = default
inline Condition &name(const std::string &name) &

Set the name of the condition.

Parameters
Returns
inline Condition &&name(const std::string &name) &&

Set the name of the condition.

Parameters
Returns
inline Condition &fragment(Fragment *fragment)

Set the fragment of the condition.

Parameters
Returns
inline Condition &spec(const std::shared_ptr<ComponentSpec> &spec)

Set the component specification to the condition.

Parameters
Returns
inline ComponentSpec *spec()

Get the component specification of the condition.

Returns
inline std::shared_ptr<ComponentSpec> spec_shared()

Get the shared pointer to the component spec.

Returns
inline virtual void setup(ComponentSpec &spec)

Define the condition specification.

Parameters
virtual YAML::Node to_yaml_node() const override

Get a YAML representation of the condition.

Returns

Protected Attributes

bool is_initialized_ = false

Friends

friend class holoscan::Operator

Previous Class ComponentSpec
Next Class Config
© Copyright 2022-2024, NVIDIA. Last updated on Jun 17, 2024.