QM  6.1.1
Model-Based Design Tool
Loading...
Searching...
No Matches
Working with Free Operations

Working with Class OperationsWorking with Events

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) {
Philo_ctor(&Philo_inst[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 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)

Working with Class OperationsWorking with Events