QM  5.1.4
Model-Based Design Tool
Working with Free Operations

Free operations are defined at a package scope, not attached to any class.

In C/C++, a free operation corresponds to a function (e.g., int foo(int x, float y)).

Free operation

This piece of the model generates the following code:

void Philo_ctor_call(void) {
uint8_t n;
for (n = 0U; n < N_PHILO; ++n) {

Free Operation Property Sheet

The free operation property sheet allows you to set the following properties:

  • operation name
  • operation return type drop-down box (NOTE: accepts also user-supplied types)
  • operation specifier (C++ only) allows you to provide such specifiers as: noexcept, etc.
  • operation inline (C++ only) checkbox
  • operation documentation for documenting the operation (see also generate comments)
  • operation code/pseudocode for specifying code of the operation (NOTE: the pseudocode box is currently not used)