31 record
By means of the record objects, any structure can be built in the rules.
These record objects can be defined directly as children of the dialog (globally available) or as children of arbitrary other objects.
record objects can also be defined for models and are passed on to instances.
A record can contain user-defined attributes as well as subrecords.
Definition
{ export | reexport } { model } record <Identifier> { <hierarchy attributes> <object-specific attributes> [ <definition of user-defined attribute> ; ] [ { export | reexport } record <Identifier> <record definition> ] }
Events
none
Children
Parent
all objects
Menu
none
31.1 Attributes
Attribute |
RSD |
PSD |
Properties |
Short Description |
---|---|---|---|---|
class |
class |
-,G/-/- |
object class |
|
boolean |
boolean |
S,G/D/C |
configurability via profile |
|
identifier |
instance |
-,G/-/- |
control the object currently belongs to |
|
identifier |
instance |
-,G/-/- |
object dialog |
|
object | document | S,G/-/- |
accesses the I-th XML Document |
|
boolean |
boolean |
-,G/-/- |
returns if the object class is an USW class |
|
class |
class |
-,G/-/- |
returns the I-th registered USW class |
|
object |
record |
S,G/-/C |
accesses the first record of an object |
|
identifier |
instance |
-,G/-/- |
groupbox the object currently belongs to |
|
integer |
integer |
-,G/-/- |
current index of object in child list of its parent |
|
string |
string |
-,G/-/- |
order of child records and attributes |
|
string |
string |
S,G/D/C |
name (identifier) of object |
|
object |
record |
S,G/-/C |
accesses the last record of an object |
|
object |
object |
-,G/-/- |
layoutbox of object |
|
attribute |
attribute |
-,G/-/- |
i-th user-defined attribute of object |
|
integer |
integer |
-,G/-/- |
number of user-defined attributes |
|
identifier |
instance |
S,G/D/C |
model belonging to object |
|
identifier |
instance |
-,G/-/- |
notepage the object currently belongs to |
|
identifier |
instance |
S,G/-/- |
parent of object |
|
object |
record |
S,G/-/C |
accesses the I-th record of an object |
|
integer |
integer |
-,G/-/- |
queries the number of child records |
|
integer |
scope |
-,G/-/- |
queries the object type (Default, Model or instance) |
|
object |
object |
-,G/-/- |
toolbar of object |
|
identifier |
instance |
-,G/-/- |
window the object currently belongs to |
31.2 Specific Attributes
With the attribute .configurable you can define whether a record can be configured, i.e. whether it can be set in the configuration file loaded with DM_LoadProfile().
By using the attribute .itemorder the order of definitions for attributes and records may be queried within records. In the string there will be deposited an A
for each attribute and an R
for each child record at the corresponding position.
31.3 Example
record Person
{
string Name;
string FirstName;
string PlaceofResidence;
}
function c void PutPerson (integer, record Person input);
function c void GetPerson (integer, record Person output);
In doing so, you can define a structure consisting of three elements and two functions which get this record as parameter.
Record with child record:
record Data
{
string Name;
integer State;
record Startvalues
{
integer Position;
integer Alphavalue;
}
record Endresult
{
boolean OK;
integer Betavalue;
integer Gammavalue;
}
}
Querying the definition order in a record:
record R
{
string Name;
record Child1
{
integer Number;
boolean On;
}
boolean Off;
}
print R.itemorder // => "ARA";
31.4 Integrating Records in Application
C modules generated by DM have to be compiled and linked to be able to provide functions for dialogs with records with an application.
These modules are generated by calling the simulation with the option +writetrampolin:
idm +writetrampolin <outfile> <dialogscript>
This statement generates the necessary modules for the call of the functions from a dialog file. According to the type of the functions which use such records, the corresponding header files (C and/or COBOL) are generated.
If such structures are used in the DM object "application", i.e. if the Distributed Dialog Manager is used, you additionally have to indicate the application for which the files are generated.
idm +writetrampolin <contfile>
+application <ApplicationName>
<dialogscript>