CrystalSpace

Public API Reference

iFactory Struct Reference
[Shared Class Facility (SCF)]

iFactory is an interface that is used to create instances of shared classes. More...

#include <csutil/scf.h>

Inheritance diagram for iFactory:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual iBaseCreateInstance ()=0
 Create a instance of class this factory represents.
virtual const char * QueryClassID ()=0
 Query class ID.
virtual const char * QueryDependencies ()=0
 Query class dependency strings.
virtual const char * QueryDescription ()=0
 Query class description string.
virtual const char * QueryModuleName ()=0
 Query library module name.
virtual void TryUnload ()=0
 Try to unload class module (i.e. shared module).

Detailed Description

iFactory is an interface that is used to create instances of shared classes.

Any object supports the iFactory interface; a QueryInterface about iFactory will return a valid pointer to the factory that was used to create that object. Thus you can clone objects without even knowing their types.

NOTE: Currently you cannot add factories to the class factory list since it is internally maintained by SCF. That is, you can use an existing factory but cannot create objects that implements this interface (well, you can but its pointless since you won't be able to add it to the factory list). Instead, you should register new class factories through the normal class registration mechanism.

Definition at line 692 of file scf.h.


Member Function Documentation

virtual iBase* iFactory::CreateInstance (  )  [pure virtual]

Create a instance of class this factory represents.

virtual const char* iFactory::QueryClassID (  )  [pure virtual]

Query class ID.

virtual const char* iFactory::QueryDependencies (  )  [pure virtual]

Query class dependency strings.

virtual const char* iFactory::QueryDescription (  )  [pure virtual]

Query class description string.

virtual const char* iFactory::QueryModuleName (  )  [pure virtual]

Query library module name.

virtual void iFactory::TryUnload (  )  [pure virtual]

Try to unload class module (i.e. shared module).


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7