EASL Code Generation Macros
Enterprise Architect provides two Enterprise Architect Simulation Library (EASL) code generation macros to generate code from behavioral models. These are:
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.
$result = %EASL_GET(<<Property>>, <<Owner ID>>, <<Name>>)
|•||<<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|
$sPropName = %EASL_GET("Property", $context, "Name")%
The EASLList macro is used to render each object in an EASL collection using the appropriate template.
$result = %EASLList=<<TemplateName>> @separator=<<Separator>>
|•||<<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|
$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-2011 Sparx Systems Pty Ltd.