Go to the documentation of this file.
39 template <
class TDerived>
44 std::string
const &path)
45 : context_strand_(ctx),
51 std::is_base_of_v<Component, TDerived>,
52 "must be derived from Component");
65 [[nodiscard]]
Uri const &
uri()
const;
80 std::string
const &name,
81 std::function<
void(TArg)>
const &f,
83 : context_strand_(
FARM_UNWRAP(component).getContextStrand()),
Definition: backtrace.cpp:102
std::string demangleTypeid(std::type_info const &type)
Transforms identifier to C++ source identifier.
Definition: component.cpp:22
Regular void type.
Definition: void.h:20
Context getContext() const
Returns the owned Context by the component.
Definition: component.cpp:34
Component(Context const &ctx, std::string scheme, TDerived *, std::string const &path)
Default constructor of a context, it gets its own io_context.
Definition: component.h:40
https://en.wikipedia.org/w/index.php?title=Uniform_Resource_Identifier&oldid=1072892451#Syntax
Definition: uri.h:22
const Uri & uri() const
Returns the unique uri of the component instance.
Definition: component.cpp:38
virtual void onReset(Void const &)
Placeholder for a component reset callback.
Definition: component.h:69
virtual ~Component()=default
Virtual destructor for component derived classes.
Contains a stranded context to post and dispatch handlers with the guarantee that none of the handler...
Definition: context.h:86
Parent definition of a farm_ng::Component.
Definition: component.h:36
ContextStrand getContextStrand() const
Returns the owned ContextStrand by the component.
Definition: component.cpp:36
Contains the execution state context.
Definition: context.h:41
#define FARM_UNWRAP(wrapper,...)
Returns *wrapper, but panics if wrapper is nullopt or null.
Definition: logger.h:576
type
Definition: event_service.py:547