Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

upf::ILoader Interface Reference

import "ILoader.idl";

Inheritance diagram for upf::ILoader:

Inheritance graph
[legend]
List of all members.

Detailed Description

upf::ILoader interface is used to load classes from external modules and to provide bindings to other languages.

It finds all implementation modules it understands (e.g. all Java implementations) in given directories and registers contained classes in upf's runtime system so that instances of these classes can be created.

Note:
This class is only interested for language bindings developers, not for "ordinary" users.


Public Types

typedef sequence< string > FilesList
 List of filenames used by loadClasses.

typedef sequence< string > ExtensionsList
 List of extensions. Extensions are strings the begin with ".".


Public Methods

void loadClasses (in string path, in FilesList files)
 Loads all classes implemented in modules stored in path.

ExtensionsList getExtensions ()
 Returns list of file extensions that the loader can handle.

string getDescription ()
 Returns human-readable description of loader type.


Member Function Documentation

string upf::ILoader::getDescription  
 

Returns human-readable description of loader type.

Examples: "native shared library", "Python script"

ExtensionsList upf::ILoader::getExtensions  
 

Returns list of file extensions that the loader can handle.

This list will be used by UPF to enumerate files in directories added by upf::IManager::addModulesPath and they will be passed to loadClasses.

Returns:
List of extensions or empty list if all files should be passed to the loader.
C++ Example:
        ExtensionsList getExtensions()
        {
          ExtensionsList list;
          list.push_back(".dll");
          list.push_back(".so");
          return list;
        }
See also:
loadClasses, upf::IManager::addModulesPath

void upf::ILoader::loadClasses in string    path,
in FilesList    files
 

Loads all classes implemented in modules stored in path.

Loading consists of two steps: loading the modules and registering upf::IClassInfo objects for all classes contained withing the modules. The meaning of "load" and "module" is implementation-dependent. Standard implementation of ILoader interface,upf.impl.DllLoader, loads all .so (or .dll on win32) files in the directory, Python classes loader may scan the directory for .py files and execute them within a Python interpreter it allocates for this purpose.

Note:
It is loader's reponsibility to recognize files in path that it can load.
This function is called every time IManager gets new source path via upf::IManager::addModulesPath().
See also:
getExtensions


Generated on Wed Jan 15 23:10:55 2003 for Universal Plugins Framework by doxygen1.2.18