QM  6.1.1
Model-Based Design Tool
Loading...
Searching...
No Matches
QM Model

Basic ModelingFully-Qualified Names

The abstract model of your software is the centerpiece of the QM™ modeling tool. In fact, QM™ can be viewed as a multifaceted model editor, which allows you to create, view, and modify the abstract model and eventually to generate code based on this model.

Note
The abstract QM model is kept entirely in memory during a QM session. This section describes the logical structure of this model. Between editing sessions, the abstract QM model is preserved on disk in an XML-based QM Model File.

A QM™ model is structured as a hierarchical tree, similar in concept to the hierarchical file system consisting of directories and files. The nodes of this tree are comprised of model items, many of which can contain other model items, similar to directories that can contain other directories and files.

Anatomy of a QM Model

A typical QM™ model has a hierarchical structure consisting of:

  • the Model Item sits at the root of the hierarchy and contains all other model items;
  • the QP framework (qpc or qpcpp) that provides you with foundation classes for derivation of your own classes, such as active objects, state machines, time events, etc. (NOTE: The QM™ Model is always based on one of the QP™ frameworks).
  • one or more packages that contain classes and possibly other model items, including packages.
  • one or more directories that contain files, which provide "templates" for the code to be generated from the model.

Model Property Sheet

The Model Item can be configured by the Model-Specific Property Sheet.

Model Property Sheet

The Model Properties are as follows:

  • The encoding drop-box property of the Model item allows you to select one of the few dozens of available character encodings for the Model File in XML. The default encoding is UTF-8, which can accommodate a wide range of languages, including special characters of many non-English languages. However, in case you wish to use a very specific encoding, you can select one of the dozens supported by QM™.
  • The save links check-box property allows you to save Model-Link Comments in the QM Model File. The presence of the links increases the size of the model file, but can be very useful in merging different versions of the model files.
  • The documentation box allows you to provide a description of the model. For the Model Item this property is not used during code generation.

Note
Internally, all textual information that you enter into a QM™ model is represented in Unicode, which means that QM™ can accommodate most of the world's writing systems.

QP Framework Item

The first item of every QM™ model is the QP framework item, which is the main enabler for automatic code generation and also provides the foundation classes for derivation of your own classes, such as state machines, active objects, time events, etc.

Framework Item (qpc)
Attention
The QP framework item is not editable (it is permanently locked).

The QP framework names inside QM™ are abbreviated compared to their names in the PSiCC2 book and other QP documentation. The following table provides the mapping:

QM Framework Item Name QP framework type
qpc QP/C
qpcpp QP/C++

The qpc, qpcpp model item contains a quite detailed and documented model of the selected QP™ framework, which you can use as a quick reference. For instance, you can check the signatures of various functions, macros, etc. You can also copy-and-paste the provided code examples into your own code anywhere in the editable parts of the model (see also Working with Code Editors).

As most software frameworks, the QP™ frameworks use the basic concepts of encapsulation (classes) and inheritance as primary mechanisms for customizing, specializing, and extending the framework to a particular application.

Basic ModelingFully-Qualified Names