Inviwo 0.9.12-pre
Inviwo documentation
|
#include <factory.h>
Public Member Functions | |
virtual bool | registerObject (FactoryObject *obj) |
virtual bool | unRegisterObject (FactoryObject *obj) |
bool | hasKey (LookUpKey key) const |
std::vector< Key > | getKeys () const |
auto | getKeyView () const |
FactoryObject * | getFactoryObject (LookUpKey key) const |
Public Member Functions inherited from inviwo::Observable< FactoryObserver< FactoryObject > > | |
Observable (const Observable< FactoryObserver< FactoryObject > > &other) | |
Observable (Observable< FactoryObserver< FactoryObject > > &&other) noexcept | |
Observable< FactoryObserver< FactoryObject > > & | operator= (const Observable< FactoryObserver< FactoryObject > > &other) |
Observable< FactoryObserver< FactoryObject > > & | operator= (Observable< FactoryObserver< FactoryObject > > &&other) noexcept |
void | addObserver (FactoryObserver< FactoryObject > *observer) |
void | removeObserver (FactoryObserver< FactoryObject > *observer) |
virtual void | startBlockingNotifications () override final |
virtual void | stopBlockingNotifications () override final |
Public Member Functions inherited from inviwo::ObservableInterface |
Protected Attributes | |
std::map< Key, FactoryObject *, std::less<> > | map_ |
Additional Inherited Members | |
Protected Member Functions inherited from inviwo::FactoryObservable< FactoryObject > | |
void | notifyObserversOnRegister (FactoryObject *p) |
void | notifyObserversOnUnRegister (FactoryObject *p) |
Protected Member Functions inherited from inviwo::Observable< FactoryObserver< FactoryObject > > | |
void | forEachObserver (C callback) |
Protected Member Functions inherited from inviwo::ObservableInterface | |
void | addObservationHelper (Observer *observer) |
void | removeObservationHelper (Observer *observer) |
A map of Keys
and associated FactoryObjects
.
FactoryObject | A factory type for some object. A `LookUpKey getClassIdentifier()ยด function is required for registration in the map. |
Key | the key type used in the map |
LookUpKey | A type used to lookup FactoryObjects in the map |
|
virtual |
The factory will not assume ownership over obj, although is assumes that obj will be valid for the lifetime of the factory
Reimplemented in inviwo::DialogFactory, and inviwo::ProcessorFactory.