QP/C 6.9.1
qf_qmact.c File Reference

QMActive_ctor() definition. More...

#include "qf_port.h"
#include "qf_pkg.h"
Include dependency graph for qf_qmact.c:

Go to the source code of this file.


void QMActive_ctor (QMActive *const me, QStateHandler initial)

Detailed Description

QMActive_ctor() definition.

This file must remain separate from the rest to avoid pulling in the "virtual" functions QHsm_init_() and QHsm_dispatch_() in case they are not used by the application.
See also

Definition in file qf_qmact.c.

Function Documentation

◆ QMActive_ctor()

void QMActive_ctor ( QMActive *const  me,
QStateHandler  initial 
Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.
[in,out]mepointer (see Object Orientation)
[in]initialpointer to the event to be dispatched to the MSM
Must be called only ONCE before QMSM_INIT().
See also
QMActive inherits QActive, so by the Object Orientation convention it should call the constructor of the superclass, i.e., QActive_ctor(). However, this would pull in the QActiveVtable, which in turn will pull in the code for QHsm_init_() and QHsm_dispatch_() implemetations, which is expensive. To avoid this code size penalty, in case QHsm is not used in a given project, the call to QMsm_ctor() avoids pulling in the code for QHsm.

Definition at line 67 of file qf_qmact.c.