company logo

5. Input_Output - System input output functions

Input/output services provide functions for supporting environment independent user input/output operations, i.e. sending run-time information to the user and receiving user input. In order to receive data from the application input area, Input() might be called.

Different types of messages might be sent from the application to the user:

  • Status message - message on console or status line (StatusMessage())
  • Application message - Message to be displayed on the output area and in the application protocol (Message(),Print())
  • Application output - User message to be displayed on the application output area, but not in the application protocol (Output())
  • Status message - passes status information to system output (StatusMessage())
  • Progress message - passing progress information to system output

Progress data usually will be displayed on console as well as in GUI applications referring to a progress bar. Similar to system input and output, progress data requests are directed to the context set as application context in the system input/output. When no context has been set, progress data will be displayed on console.

In order to activate progress display, the option SystemIO.Progress has to be set to a proper progress display type. Several sub options allow controlling the way of displaying progress information. More details one may find in Reference documentation/Common ODABA options

Displaying progress information usually requires several actions supported by SystemClass:

    StartProgress()

    DisplayProgress()

    StopProgress()

The example below demonstrates the simple use of displaying system progress. The example below shows an OSI function fragment that illustrates the use of message and progress display functions.

// process producong progress information (OSI function in ODC_ImpClass)

... fragment ODC_ImpClass::doForFunctions ( ) {

SystemClass::Message("Processing class functions of: " + sys_ident);

...

   SystemClass::StartProgress("Generate source code file for " + sys_ident,pfunctions.count);

   while ( pfunctions.next ) {

     SystemClass::DisplayProgress(pfunctions.currentPosition);

     ... do something for function

   }

   SystemClass::StopProgress();

}

Notes:

When SystemClass function names are not ambigeous, from within OSI SystemClass functions might be called without scope name.

Functions