libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AlgAudio::ModuleFactory Class Reference

#include <ModuleFactory.hpp>

Static Public Member Functions

static LateReturn
< std::shared_ptr< Module > > 
CreateNewInstance (std::shared_ptr< ModuleTemplate > templ, std::shared_ptr< Canvas > parent)
 
static LateReturn
< std::shared_ptr< Module > > 
CreateNewInstance (std::string id, std::shared_ptr< Canvas > parent)
 
static LateReturn DestroyInstance (std::shared_ptr< Module >)
 
static std::shared_ptr
< ModuleTemplate
GetTemplateByID (std::string)
 

Detailed Description

This class contains procedures for correct creation and destruction of Module instances.

Member Function Documentation

static LateReturn<std::shared_ptr<Module> > AlgAudio::ModuleFactory::CreateNewInstance ( std::shared_ptr< ModuleTemplate templ,
std::shared_ptr< Canvas parent 
)
static

Creates, initializes and installs a new module instance. This is the correct way to create new module instances. In case of problems, this method may latethrow Exceptions::ModuleInstanceCreationFailed. The returned pointer is never null, and always points to a valid module.

Parameters
templThe module template to use when creating a new instance.
parentThe parent canvas where this new instance shall be installed.
static LateReturn<std::shared_ptr<Module> > AlgAudio::ModuleFactory::CreateNewInstance ( std::string  id,
std::shared_ptr< Canvas parent 
)
static

Creates, initializes and installs a new module instance. This is the correct way to create new module instances. In case of problems, this method may latethrow Exceptions::ModuleInstanceCreationFailed. The returned pointer is never null, and always points to a valid module.

Parameters
idThe module template id to use when creating a new instance.
parentThe parent canvas where this new instance shall be installed.
static LateReturn AlgAudio::ModuleFactory::DestroyInstance ( std::shared_ptr< Module )
static
static std::shared_ptr<ModuleTemplate> AlgAudio::ModuleFactory::GetTemplateByID ( std::string  )
static

The documentation for this class was generated from the following file: