iSCF is the interface that allows using SCF functions from shared classes.
Since there should be just one instance of SCF kernel, the shared classes should not use scfXXX functions directly; instead they should obtain a pointer to an iSCF object and work through that pointer.
Member Function Documentation
bool iSCF::ClassRegistered (
const char * iClassID ) [pure virtual]
Check whenever the class is present in SCF registry.
You can use this function to check whenever a class instance creation failed because the class is not present at all in the class registry, or it just doesn't support the requested interface.
void * iSCF::CreateInstance (
const char * iClassID,
const char * iInterface,
int iVersion ) [pure virtual]
Create an instance of a class that supports given interface.
The function returns NULL either if such a class ID is not found in class registry, or a object of given class does not support given interface or supports an incompatible version of given interface. If you want to make a difference between these error conditions, you can check whenever such a class exists using scfClassRegistered() function.
If you specify NULL as iInterfaceID, you'll receive a pointer to the basic interface, no matter what it is. The reference count will be zero thus you should increment it yourself if you use this approach. You can treat the pointer returned just as an iBase*, not more. If you need more, do QueryInterface() on received pointer (this will also increment the reference counter).
void iSCF::Finish (
) [pure virtual]
This function should be called to finish working with SCF.
This will not free shared objects but they should not be used anymore after calling this function since this will do a forced free of all loaded shared libraries.
const char * iSCF::GetClassDependencies (
const char * iClassID ) [pure virtual]
Query the dependency list for a class.
The format of dependency string is implementation-specific, SCF itself does not make any assumptions about the format of the string.
const char * iSCF::GetClassDescription (
const char * iClassID ) [pure virtual]
Query the description of a class.
NOTE: At least one instance of this class should exist, or the class should be a static class. Otherwise the function will return NULL
scfInterfaceID iSCF::GetInterfaceID (
const char * iInterface ) [pure virtual]
Return the interface ID number that belongs to the given interface.
If the interface is unknown, a new ID is allocated. This number can be used to quickly determine whether two interfaces are equal.
Retrieve a list of class names whose prefix matches a pattern string.
For example, QueryClassList("crystalspace.sound.loader.") will return a list of class names which begin with the string "crystalspace.sound.loader.". If pattern is zero length or the null pointer, then all registered class names are returned. If any class names match the pattern, then the return value is a list strings. If no class names match the pattern string, then the returned list is empty. It is the caller's responsibility to invoke DecRef() on the returned list when the list is no longer needed.
bool iSCF::RegisterClass (
const char * iClassID,
const char * iLibraryName,
const char * Dependencies = NULL ) [pure virtual]
Register a single dynamic class (implemented in a shared library).
This function tells SCF kernel that a specific class is implemented within a specific shared library. There can be multiple classes within a single shared library. You also can provide an application-specific dependency list.
Register a set of static classes (used with static linking).
If you design a SCF module that contains a number of SCF classes, and you want that module to be usable when using either static and dynamic linkage, you can use scfRegisterClassList (or the SCF_SCF_REGISTER_STATIC_LIBRARY macro) to register the export class table with the SCF kernel.
Register a single static class (that is, implemented in SCF client module).
This function is similar to scfRegisterClass but is intended to be used with statically linked classes (that is, not located in a shared library)
void iSCF::UnloadUnusedModules (
) [pure virtual]
Unload all unused shared libraries (also called inside scfCreateInstance).
If you want to be sure that all unused shared libraries are unloaded, call this function. It is automatically invoked inside scfCreateInstance(), thus it is called from time to time if you constantly create new objects.
bool iSCF::UnregisterClass (
const char * iClassID ) [pure virtual]
This function should be called to deregister a class at run-time.
By calling this function you will remove the description of a class, no matter whenever it is statically or dynamically linked, from the SCF registry.
The documentation for this struct was generated from the following file: