User-defined logic parts provide the business logic for your EGL
applications. EGL offers two kinds of logic parts:
- Main logic parts
- EGL converts these parts into executable Java™ or COBOL programs. Specify EGL logic by
using EGL statements in EGL functions. Main part types are classified
by their number of entry points and the manner of their invocation:
- Program
- Program parts have a single entry point and you invoke them by
starting, transferring to, or calling the program.
- Library
- Library parts support sharing functions and variables. Libraries
are multiple entry point main parts that you access through direct
calls to the shared library functions or through direct references
to the shared library variables.
- Service
- Services are shared function libraries whose functions can be
invoked locally or across a network (including the Internet).
- Handler
- Handlers are multiple entry point programs whose external functions
are invoked in response to an event. There are no handlers in the
core EGL package; all EGL handlers involve some sort of user interface.
See Handler part.
- Prototype logic parts
- These parts contain no logic of their own. Instead they provide
information needed to invoke services, programs, and functions defined
elsewhere. Prototype parts include:
- Interface
- Interface parts provide information needed to invoke a remote
service.
- ExternalType
- ExternalType parts provide information needed to invoke methods
associated with Java classes
and objects.
- Delegate
- Delegate parts provide information for invoking an EGL function
through a function pointer variable.
- Functions
- Functions are not parts, but are the major components of main
logic parts. Functions contain the first executable code in the program
(the main() function), or are called from other functions.
In addition to these main categories, there is a special case:
stand-alone functions are logic parts. EGL maintains stand-alone functions
for compatibility; their use is discouraged in new code. For more,
see Stand-alone function part.
Most of these parts have unique sets of properties that you can
set to control the behavior of the code that you generate from the
EGL source.