Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::RepresentationFactory< Representation > Class Template Reference

#include <representationfactory.h>

Inheritance diagram for inviwo::RepresentationFactory< Representation >:

Public Member Functions

 RepresentationFactory (BaseReprId defaultRepresentation)
virtual BaseReprId getBaseReprId () const override
std::unique_ptr< Representation > createOrDefault (BaseReprId id, const typename Representation::ReprOwner *owner)
Public Member Functions inherited from inviwo::StandardFactory< Representation, RepresentationFactoryObject< Representation >, std::type_index, const Representation::ReprOwner * >
virtual std::unique_ptr< Representation > create (std::type_index key, Args... args) const override
virtual bool hasKey (std::type_index key) const override
Public Member Functions inherited from inviwo::Factory< Representation, std::type_index, Args... >
Factoryoperator= (const Factory &)=delete
virtual std::shared_ptr< Representation > createShared (std::type_index key, Args... args) const
Public Member Functions inherited from inviwo::FactoryRegister< RepresentationFactoryObject< Representation >, factoryKeyType< std::type_index >, std::type_index >
virtual bool registerObject (RepresentationFactoryObject< Representation > *obj)
virtual bool unRegisterObject (RepresentationFactoryObject< Representation > *obj)
bool hasKey (std::type_index key) const
std::vector< factoryKeyType< std::type_index > > getKeys () const
auto getKeyView () const
RepresentationFactoryObject< Representation > * getFactoryObject (std::type_index key) const
Public Member Functions inherited from inviwo::Observable< FactoryObserver< RepresentationFactoryObject< Representation > > >
Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > & operator= (const Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > &other)
void addObserver (FactoryObserver< RepresentationFactoryObject< Representation > > *observer)
void removeObserver (FactoryObserver< RepresentationFactoryObject< Representation > > *observer)
virtual void startBlockingNotifications () override final
virtual void stopBlockingNotifications () override final

Additional Inherited Members

Public Types inherited from inviwo::BaseRepresentationFactory
using BaseReprId = std::type_index
Protected Member Functions inherited from inviwo::FactoryObservable< RepresentationFactoryObject< Representation > >
void notifyObserversOnRegister (RepresentationFactoryObject< Representation > *p)
void notifyObserversOnUnRegister (RepresentationFactoryObject< Representation > *p)
Protected Member Functions inherited from inviwo::Observable< FactoryObserver< RepresentationFactoryObject< Representation > > >
void forEachObserver (C callback)
Protected Member Functions inherited from inviwo::ObservableInterface
virtual void addObserver (Observer *observer)=0
virtual void removeObserver (Observer *observer)=0
void addObservationHelper (Observer *observer)
void removeObservationHelper (Observer *observer)
Protected Attributes inherited from inviwo::FactoryRegister< RepresentationFactoryObject< Representation >, factoryKeyType< std::type_index >, std::type_index >
std::map< factoryKeyType< std::type_index >, RepresentationFactoryObject< Representation > *, std::less<> > map_

Detailed Description

template<typename Representation>
class inviwo::RepresentationFactory< Representation >

Factory for representations of a specific base type (Volume Representation, Layer Representation, Buffer Representation, etc)

Template Parameters
Representationthe base representation type for the factory. All registered representation has to derive from this base class (for example
See also
VolumeRepresentation)
Data
DataRepresentation
RepresentationFactoryObject
RepresentationMetaFactory
InviwoApplication::getRepresentationFactory()
InviwoModule::registerRepresentationFactoryObject()
InviwoModule::registerRepresentationFactory()

Constructor & Destructor Documentation

◆ RepresentationFactory()

template<typename Representation>
inviwo::RepresentationFactory< Representation >::RepresentationFactory ( BaseReprId defaultRepresentation)
inline

Create a RepresentationFactory

Parameters
defaultRepresentationId of the default representation type to use in the factory

Member Function Documentation

◆ createOrDefault()

template<typename Representation>
std::unique_ptr< Representation > inviwo::RepresentationFactory< Representation >::createOrDefault ( BaseReprId id,
const typename Representation::ReprOwner * owner )
inline

Try to create a representation of the requested type, if that type was not found, return a representation of the default type.

◆ getBaseReprId()

template<typename Representation>
virtual BaseReprId inviwo::RepresentationFactory< Representation >::getBaseReprId ( ) const
inlineoverridevirtual

The documentation for this class was generated from the following file:
  • representationfactory.h