dasher
Class CModuleFactory

java.lang.Object
  extended by dasher.CModuleFactory
Direct Known Subclasses:
CWrapperFactory

public abstract class CModuleFactory
extends java.lang.Object

A ModuleFactory is a factory capable of yielding one or more distinct CDasherModules, each associated with a friendly name and a unique identifier.


Constructor Summary
CModuleFactory()
           
 
Method Summary
abstract  CDasherModule GetModule(long iID)
          Retrieves the module associated with a given unique identifier
abstract  java.lang.String GetName(long iID)
          Gets the name of a module by UID.
abstract  SFactoryInfo GetNext(SFactoryInfo info)
          Given information about a previous module, returns a struct describing the next module.
abstract  int GetType(long iID)
          Gets the type of a given module by UID.
abstract  boolean IsMore()
          Are more modules available beyond those already yielded?
abstract  void Start()
          Called when a factory is to be registered with a ModuleManager and will shortly be asked for its modules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CModuleFactory

public CModuleFactory()
Method Detail

Start

public abstract void Start()
Called when a factory is to be registered with a ModuleManager and will shortly be asked for its modules. Any work involved in creating its modules or setting up its internal state should be done now.


IsMore

public abstract boolean IsMore()
Are more modules available beyond those already yielded?

Returns:
True if so, false otherwise

GetNext

public abstract SFactoryInfo GetNext(SFactoryInfo info)
Given information about a previous module, returns a struct describing the next module.

In order to retrieve the first factory, a new/blank SFactoryInfo should be passed in.

Null should never be passed as a parameter.

Parameters:
info - SFactoryInfo describing the previous module or, to retrieve the first module, a blank SFactoryInfo.
Returns:
SFactoryInfo describing the next module

GetModule

public abstract CDasherModule GetModule(long iID)
Retrieves the module associated with a given unique identifier

Parameters:
iID - UID of the required module
Returns:
Corresponding module, or null if no module belonging to this factory has this ID.

GetName

public abstract java.lang.String GetName(long iID)
Gets the name of a module by UID.

Parameters:
iID - UID of the requested module
Returns:
Name of the requested module, or "Not Implemented" if there is no such module

GetType

public abstract int GetType(long iID)
Gets the type of a given module by UID.

Parameters:
iID - UID of the requested module
Returns:
Type of the given module, or 0 if there is no such module