121 if (requester ==
nullptr) {
136 if (c == requester) {
141 T* t =
dynamic_cast<T*
>(c);
Helper class to manage decoupling of components.
Definition: cs_Component.h:35
cs_ret_code_t initChildren()
virtual std::vector< Component * > getChildren()
Components with children can override this method to return them.
Definition: cs_Component.h:90
void setParent(Component *p)
Children that are instantiated later can also be added individually.
void parentAllChildren()
utility that loops over all elements of getChildren() and setParent on the non-nullptr ones.
virtual cs_ret_code_t init()
Components can implement this if they need to get references to sibling or if they need to do specifi...
Definition: cs_Component.h:70
T * getComponent(Component *requester=nullptr)
Returns a component of type T* from _parent->children(), If not found try again with ancestors: _pare...
Definition: cs_Component.h:119
virtual ~Component()=default
Component * _parent
Definition: cs_Component.h:113
@ ERR_SUCCESS
Definition: cs_ErrorCodes.h:10
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21