Interface Loops

 

An interface loop is a template file construct which allows you to iterate through the collection of interfaces that CodeGen has information about. These interface definitions come from a Synergy Method Catalog.

 

Interface loops are delimited by a matching pair of <INTERFACE_LOOP> and </INTERFACE_LOOP> tags, which surround the template code to be inserted for each interface. The code between the opening and closing tags of an interface loop is repeated for each interface in the method catalog being processed. This code may contain other generic and structure tokens, and may also contain special interface loop tokens, which are discussed later. Loop utility tokens can also be used in interface loops.

 

There are two types of interface loops, called multi-line interface loops, and in-line interface loops.

 

Multi-Line Interface Loops

Multi-line interface loops occur when the opening and closing interface loop tags appear on separate lines in a template file, and delimit one or more entire lines of template code, like this:

[code]

<INTERFACE_LOOP>

code

</INTERFACE_LOOP>

[code]

Multi-line interface loops generate one or more lines of output code for each interface that is processed.

In-Line Interface Loops

In-line interface loops exist when the opening and closing interface loop tags appear on the same line in a template file, and delimit part of a line of template code, like this:

[code] <INTERFACE_LOOP> code </INTERFACE_LOOP> [code]

In-line interface loops generate code into the current output line.

 

 

 


Copyright © 2018  Synergex International, Inc.