Home News DOC Class DL Others Rice
DOC  >  Dynamic class loading
Dynamic class loading

Registration of classes at startup.

Embedded class .dll files put in the dlls directory which is a subdirectory of the execution directory are dynamically loaded at startup.

The following sections describe registration of classes at startup.

File name

The Cooker determines whether it is an embedded class by the file name. Therefore, .dll files of embedded class must follow the specified naming rule.

The naming rule is as follows.


For example

If it is a .dll file for datetime class, the file name is "Rtype.Datetime.dll".

If it is a .dll file for regex (Regular expression) class, the file name is "Rtype.Regex.dll".

If file name do not follow this naming rule, class will not be registered.

dlls directory

The Cooker dynamically loads embedded classes from the dlls directory at startup.

The dlls directory must be a child directory of the directory where contains the Cooker.exe. In other words, the dlls directory must be in the same directory as Cooker.exe.

As explained above, it judges by file name whether it is an embedded class or not.

Embedded class must be placed in the dlls directory, but, it does not have to be direct child of the dlls directory.

Searching for embedded class is done recursively for the dlls directory. In other words, embedded class is loaded dynamically if it is somewhere in the directory hierarchy under the dlls directory.

When introducing a new class, you can create a subdirectory under the dlls directory and place the .dll file there.

Copyright © Rice All rights reserved.