Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::FactoryRegister< FactoryObject, Key, LookUpKey > Class Template Reference

#include <factory.h>

+ Inheritance diagram for inviwo::FactoryRegister< FactoryObject, Key, LookUpKey >:

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)
 

Detailed Description

template<typename FactoryObject, typename Key, typename LookUpKey>
class inviwo::FactoryRegister< FactoryObject, Key, LookUpKey >

A map of Keys and associated FactoryObjects.

Template Parameters
FactoryObjectA factory type for some object. A `LookUpKey getClassIdentifier()ยด function is required for registration in the map.
Keythe key type used in the map
LookUpKeyA type used to lookup FactoryObjects in the map

Member Function Documentation

◆ registerObject()

template<typename FactoryObject , typename Key , typename LookUpKey >
bool inviwo::FactoryRegister< M, Key, K >::registerObject ( FactoryObject * obj)
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.


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