company logo

Dictionary :: loadOSILibraries - Load OSI script files from OSI library path

The function allows loading a number of script files from a library path. When loading OSI files defined in the library path before calling OSI functions, those will overload corresponding OSI functions defined in the resource database (see also Dictionary::loadOSIScript()). After the last directory, the path may be appended by a file mask (e.g. '*.osi'). When not passing a file mask, all files ('*.*') are included.

In order to overload OSI functions properly, the function should be called after opening the database (e.g. in the DatabaseContext::daAfterOpen() handler.

Several directories or files may be passed separated by semicolon. Each path may refer to a file, directory or directory with a file mask. Including files, which are not proper OSI files may cause an exception. When an invalid path has been detected (neither valid file nor directory), the function throws an exception.

Notes:

Including binary files may cause strange reactions.

Implementation overview

Implementation details

  1. Load OSI script files to dictionary
    Dictionary  :: loadOSILibraries ( bool bServer )

    The function loads OSI script files 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. The directory path is taken from the value in the OSI_Library option variable (as being set on client or server).

    • bServer - Server option
  2. to list
  3. Load OSI script files to local dictionary
    Dictionary  :: loadOSILibraries (  )

    The function loads OSI script files to the local dictionary, which is the client dictionary, when being called from client and the server dictionary when being called from server. The directory path is taken from the value in the OSI_Library option variable.

    OSI_Library=myProject/osi/Person.osi

    OSI_Library=myProject/osi/*.osi;common/osi/*.*

  4. to list
  5. Load OSI function from library path
    Dictionary  :: loadOSILibraries ( odaba::String &sLibraryPath, bool bServer )

    The function loads OSI script files from the library path passed in sLibraryPath to the server dictionary, when passing true in bServer. Otherwise, the function loads the script files to the local dictionary, which is the client dictionary, when being called from client and the server dictionary when being called from server.

    • sLibraryPath - Library path

      A library path defines a number of file or directory paths separated by semicolon (;).

      myProject/lib/Person.lib

      myProject/osi/*.osi;common/osi/*.*

    • bServer - Server option
  6. to list
  7. Load OSI function from library path to local directory
    Dictionary  :: loadOSILibraries ( odaba::String &sLibraryPath )

    The function loads OSI script files from the library path passed in sLibraryPath to the local dictionary, which is the client dictionary, when being called from client and the server dictionary when being called from server.

    • sLibraryPath - Library path

      A library path defines a number of file or directory paths separated by semicolon (;).

      myProject/lib/Person.lib

      myProject/osi/*.osi;common/osi/*.*

  8. to list