company logo

SystemClass - System services

The SystemClass provides a number of static functions in order to perform specific requirements. Originally, the class was not intended to be published, but it turned out, that it provides useful functionality. SystemClass functions are static functions that might be called from within C++ or OSI functions,

Moreover, this class is an example, how one may extent the OSI functionality by writing an OSI interface class in order to provide an OSI interface.

Notes:

When calling SystemClass functions from within OSI functions, C++ types NString and NPath have to be passed as OSI STRING values. Enumerated values are also passed as string values containing the exact enumerator name (case sensitive).

Progress display

System classes provide several function in order to display progress information. 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

There are three functions supported by SystemClass , which might be called in order to display progress information:

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 progress display functions.

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

... fragment ODC_ImpClass::doForFunctions ( ) {

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

     while ( pfunctions.next ) {

       ::DisplayProgress(pfunctions.currentPosition);

       ... do something for function

     }

...  ::StopProgress();

}

Format settings

ODABA provides some features for supporting number, date and time conversion into strings. Since data conversion is made implicitly in many cases, the way of data conversion can be defined in common format settings. System class provides the following functions for changing format settings.

Function Groups
Functions