Processing a Synergy Method Catalog

unlisted

Processing a Synergy Method Catalog

 

If your Synergy application development environment includes the use of Synergy/DE xfServerPlus then you can generate code based on the metadata contained within the Synergy Method Catalog. To enable this feature you must export your method catalog to an XML file, and then use the -smc and optionally the -interface command line options.

 

Processing a Single Interface

 

To process a single interface you must use both the -smc and -interface options together. For example:

 

codegen -smc C:\my\files\smc.xml -interface MyInterface -t template -r

 

Within a template file you can use a method loop to iterate through the methods that are members of the interface being processed, and within the method loop you can use method loop expansion tokens and method loop expression tokens.

 

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

 

If a method has parameters you can iterate through them using a parameter loop, and within the parameter loop you can use parameter loop expansion tokens and parameter loop expression tokens.

 

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

<PARAMETER_LOOP>

 

;Parameter loop code and tokens goes here

 

</PARMAETER_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

 

Processing All Interfaces

 

If you wish to process all of the interfaces that are defined in the method catalog, one at a time, then use the -smc option alone, and use an interface loop in your template file. Inside the interface loop you can use interface loop expansion tokens and interface loop expression tokens. Interface loops can contain method loops and parameter loops:

 

<INTERFACE_LOOP>

 

;Interface loop code and tokens goes here

   

<METHOD_LOOP>

 

;Method loop code and tokens goes here

 

<PARAMETER_LOOP>

 

;Parameter loop code and tokens goes here

 

</PARMAETER_LOOP>

 

;Method loop code and tokens goes here

 

</METHOD_LOOP>

 

;Interface loop code and tokens goes here

 

</INTERFACE_LOOP>

 

 

 

 


Copyright © 2018  Synergex International, Inc.