QP/C  6.5.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.

Functions

void QMActive_ctor (QMActive *const me, QStateHandler initial)
 protected "constructor" of an QMActive active object. More...
 

Detailed Description

QMActive_ctor() definition.

Description
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
qf_qact.c

Definition in file qf_qmact.c.

Function Documentation

◆ QMActive_ctor()

void QMActive_ctor ( QMActive *const  me,
QStateHandler  initial 
)

protected "constructor" of an QMActive active object.

Description
Performs the first step of active object initialization by assigning the virtual pointer and calling the superclass constructor.
Parameters
[in,out]mepointer (see Object Orientation)
[in]initialpointer to the event to be dispatched to the MSM
Note
Must be called only ONCE before QMSM_INIT().
See also
QHsm_ctor() and QFsm_ctor()
Note
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 QActiveVtbl, 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.