EASL Code Generation Macros
Enterprise Architect provides two Enterprise Architect Simulation Library (EASL) code generation macros to generate code from behavioral models. These are:
EASL_GET
The EASL_GET macro is used to retrieve a property or a collection of an EASL object. The EASL objects and the properties and collections for each object are identified in the EASL Collections and EASL Properties topics.
Syntax
$result = %EASL_GET(<<Property>>, <<Owner ID>>, <<Name>>)
where:
· | <<Property>> is either "Property" or "Collection" |
· | <<OwnerID>> is the ID of the owner object for which the property/collection is to be retrieved |
· | <<Name>> is the name of the property or Collection being accessed |
· | $result is the returned value; this is �� if not a valid property
|
Example
$sPropName = %EASL_GET("Property", $context, "Name")%
EASLList
The EASLList macro is used to render each object in an EASL collection using the appropriate template.
Syntax
$result = %EASLList=<<TemplateName>> @separator=<<Separator>>
@indent=<<indent>> @owner=<<OwnedID>>
@collection=<<CollectionName>> @option1=<<OPTION1>>
@option2=<<OPTION2>>......... @optionN=<<OPTIONN>>%
where:
· | <<Separator>> is a list separator (such as �\n�) |
· | <<indent>> is any indentation to be applied to the result |
· | <<owner>> is the ID of the object that contains the required collection |
· | <<CollectionName>> is the name of the required collection |
· | <<OPTION1>....<<OPTION99>> are miscellaneous options that might be passed on the template; each option is given as an additional input parameter to the template |
· | $result is the resultant value; this is �� if not a valid collection
|
Example
$sStates = %EASLList="State" @separator="\n" @indent="\t"
@owner=$StateMachineGUID @collection="States" @option=$sOption%
Behavioral Model Templates
The material ("material" includes all pages, documents and on-line graphics) on this web site is protected by copyright law. (C) 1998-2015 Sparx Systems Pty Ltd.