Dictionary :: loadOSIScript - Load OSI functions from script file
In order to load operations (typically OSI functions) from external files rather than from a resource database, this function might be called when starting up an application. OSI functions are loaded, only, when not yet being registered to the dictionary, e.g. when starting up an application (after the dictionary has been opened).
Loading a script file with exactly the same file path twice will be ignored without warning. Thus, one script file might be included in several script files loaded for a dictionary without causing problems.
Once, an operation for a class has been loaded, it cannot be replaced. Hence, when loading an operation after it has been loaded from the resource database or from another script file, loading the operation will be denied with an error message in the error log file.
In order to reset the dictionary, i.e. removing all operations defined for the dictionary so far (includes OSI functions, but also C++ interface functions), one may call Dictionary ::resetOperations() . Operations from the dictionary will be loaded again on demand automatically.
In order to load a number of script files from one or more directories, one may call loadOSILibraries() .
When running client/server applications, the function should be called on server side. In any case, the function is passed to the server and files have to be provided on server side.
Implementation overview
- Load OSI script to dictionary
Dictionary :: loadOSIScript ( sFilePath, bServer ) - Load OSI script to local dictionary
Dictionary :: loadOSIScript ( sFilePath )
Implementation details
-
Load OSI script to dictionary
Dictionary  :: loadOSIScript ( odaba::String &sFilePath, bool bServer )
The function loads the script file to the server dictionary, when passing true in bServer . Otherwise, the function loads the script to the local dictionary, which is the client dictionary, when being called from client and the server dictionary when being called from server.
- sFilePath - Complete file path
- bServer - Server option
to list
-
Load OSI script to local dictionary
Dictionary  :: loadOSIScript ( odaba::String &sFilePath )
The function loads an OSI script file to the local dictionary, which is the client dictionary, when being called from client and the server dictionary when being called from server.
- sFilePath - Complete file path
to list