vsTASKER 7 User Manual
×
Menu
Index

Properties

 
Properties
1

Name

1. Name
Name of the Data Model. Must be unique.
The class generated will be CigiData.
 
2

Model

2. Model
Name of the Container the Data Model belongs.
 
3

Type

3. Type
Choice between:
 
  • Local: the Data Model is defined locally in that database only. It can be exported, copied, duplicated and changed. Source code is available.
  • External: the Data Model is available in a library. Only the interface (header file) is available in read-only. User can only changes default values.
When External, the object can be specified or changed using button:
From the selection window, header file and library (including the Data Model) will be listed (read only).
These information are part of the Model Definition files. See here for more info.
 
4

Used By

4. Used By
List all the entities in different scenarios, using this Data Model.
Format: Scenario - Type (Entity, Player or Catalog) - Name
 
5

Inherit From

5. Inherit From
Specify the Data Model (external or local) the current one inherit from, to specialize it.
Plain arrow is use to translate this inheritance.
Select the Data Model in the Available Items list (8) then use the button to set.
Use the button to remove the inheritance.
Inheritance is translated into C++ inheritance as the Data Model is itself a C++ class. This inheritance feature must be understood this way.
6

Is Using

6. Is Using
Specify all the Data Models (externals or locals) the current one are using internally as variables.
This setting is used for the code generation to create correct makefile and add necessary #include into the header file.
Dashed arrows are use to translate this usage.
Select the Data Model in the Available Items list (8) then use the button to add.
Select the Data Model in the list and use the button to remove.
This is important for declaration resolution conflicts at compile time. vsTASKER automatically lists Data Models in the proper order.
7

Inherited By

7. Inherited By
List all the Data Models (or Components) that inherit from the current one.
 
8

Available Items

8.
List all the Data Models loaded into the database (externals or locals).
 
9

Disabled

9.
Exclude the Data Model from the code generation.
Disabled Data Model will not be included into the items using it (entities but not only) without the need to remove it from all users.
Disabling is error prone while removing might leave dangled pointers.
 
10

Model Only

10.
When checked, the Data Model will not be available into the entity model list.
 
11

Instanciate

11.
If checked, the Data Model class, when attached to an owner (Entity, Player, etc.) will create an object with new.
If unchecked, the attachment will be seen as a reference without object (NULL pointer). This can be useful when different Entities (for example) must share a same and unique Data Model. It is then the responsibility of the user code (wherever it is) to create the Data Model, reference it whenever it is needed and delete it at simulation stop.
 
12

Locked

12.
When checked, the Data Model cannot be modified. All changes will be lost at Ok or Apply.
 
13

Import

13.
Use this button to replace the current Data Model with a previously exported Data Model in /Data/Shared/Models.
All current content will be lost.
 
14

Export

14. Export
Use this button to save the current Data Model for later import. Default location is /Data/Shared/Models.
 
15

Make Lib

15.
Use this button to automatically translate the current local Data Model into a C++ class with a header and a source file, in order to include it into a dedicated library.
The Data Model will then become External.
See here for more information.
 
16

Color

16.
Specify the color to be used for drawing the Data Model symbol into the Diagram panel.
Default is white.
 
17

Definitions

17. Definitions
Put in this panel all #include (third-party API), #define and typedef needed for the current Data Model.
This content is put as is, without any preprocessing, at the beginning of the database header file and outside of any class definition.
 
18

Declarations

18. Declarations
Put in this panel all methods and data you want to add in the current Data Model.
 
Interface: User can define here interface variables. See Dyn-UI for all Options. 
See Inlines: show the automatic inlines as they will be generated for the Dyn-UI variables.
See Defaults: show the setDefault() function as it will be code generated from the Dyn-UI DEF[] definitions.
See User-Data: show the setUserData() function (user defined interface values) as it will be generated, for the Dyn-UI variables.
See Update: show the update() function (sim to gui at runtime) as it will be generated, for the Dyn-UI variables.
 
19

Inlines

19. Inlines
Put in this panel all inline methods of the current DataModel.
There is a preprocessing of the Inlines content, so do not forget the keyword inline and the word Dml:: before any method name.
 
20

Initialization

20. Initialization
This part is called automatically at instantiation (INIT), when DataModel is created using new, or every time the DataModel is reset and finally at destruction (CLEAN) using delete.
 
Default Values: Pop up the variable Dyn-UI allowing the user to supersede or overwrite the default values (DEF[]) of the current Dyn-UI. These values will be set using the setUserData() function call with the default Dyn-UI then, the same function will be called with the DataModel owner Dyn-UI setting.
It is a good practice to put in the RESET part whatever must be reinitialized at reset. There is no break after INIT to allow the RESET part to be processed after INIT, at Data Model creation time.
21

Reaction

21. Reaction
This part is used to process EVENT or PACKET events when selected.
case Event received from raiseEvent(...) method in the code.
case Packet received from send(...) method in the code.
 
If Accept Events is checked, the case..break code block will be called whenever an Event is raised towards the Entity holding the Data Model.
If Accept Packets is checked, the case..break code block will be called whenever a Packet is received in a Channel used by the Entity holding the Data Model.
Refer to the Developer Guide for more details on system phases/events.
22

Methods

22. Methods
Put in this panel all methods of the current Data Model declared in the Declaration panel.
There is a preprocessing of the Methods content, so do not forget the word Dml:: before any method name.
 
23

Help

23. Help
Any description of the Data Model can be put here and will be used for the automatic document generation (see Make Documents)