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

syn::ModuleFactory Class Reference

factory. More...

#include <ModuleFactory.h>

Inheritance diagram for syn::ModuleFactory:

Inheritance graph
[legend]
Collaboration diagram for syn::ModuleFactory:

Collaboration graph
[legend]
List of all members.

Public Methods

 ModuleFactory ()
void reg (std::string typeName, const Module &proto)
 register a module type with the factory. More...

void unreg (std::string typeName)
 remove a module type from the factory. More...

bool create (std::string typeName, Module *&newModule)
 create a module. More...


Detailed Description

factory.

Definition at line 60 of file ModuleFactory.h.


Constructor & Destructor Documentation

syn::ModuleFactory::ModuleFactory ( ) [inline]
 

Definition at line 63 of file ModuleFactory.h.


Member Function Documentation

void syn::ModuleFactory::reg ( std::string typeName,
const Module & proto ) [inline]
 

register a module type with the factory.

Precondition:
the module must have a working clone() method.

Definition at line 96 of file ModuleFactory.h.

Referenced by ModuleFactory().

void syn::ModuleFactory::unreg ( std::string typeName ) [inline]
 

remove a module type from the factory.

Definition at line 102 of file ModuleFactory.h.

bool syn::ModuleFactory::create ( std::string typeName,
Module *& newModule ) [inline]
 

create a module.

Precondition:
typeName should be a type name of a module registered with reg().
Postcondition:
returns false if typeName is undefined, return true and a new module if typeName was registered.

Definition at line 112 of file ModuleFactory.h.


The documentation for this class was generated from the following file:
Generated at Mon Apr 15 09:27:59 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001