Inviwo  0.9.10.1
Inviwo documentation
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 bool registerObject (RepresentationFactoryObject< Representation > *obj)
 
virtual bool unRegisterObject (RepresentationFactoryObject< Representation > *obj)
 
virtual std::unique_ptr< Representation > create (std::type_index key, Args... args) const override
 
virtual bool hasKey (std::type_index key) const override
 
virtual std::vector< Key > getKeys () const
 
- Public Member Functions inherited from inviwo::FactoryBase
 FactoryBase (const FactoryBase &)=delete
 
FactoryBaseoperator= (const FactoryBase &)=delete
 
 FactoryBase (FactoryBase &&)=default
 
FactoryBaseoperator= (FactoryBase &&)=default
 
- Public Member Functions inherited from inviwo::Observable< FactoryObserver< RepresentationFactoryObject< Representation > > >
 Observable (const Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > &other)
 
 Observable (Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > &&other)
 
Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > & operator= (const Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > &other)
 
Observable< FactoryObserver< RepresentationFactoryObject< Representation > > > & operator= (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
 
- Public Types inherited from inviwo::StandardFactory< Representation, RepresentationFactoryObject< Representation >, std::type_index, const Representation::ReprOwner * >
using Key = typename std::remove_cv< typename std::remove_reference< std::type_index >::type >::type
 
using Map = std::unordered_map< Key, RepresentationFactoryObject< Representation > * >
 
- 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
void addObservationHelper (Observer *observer)
 
void removeObservationHelper (Observer *observer)
 
- Protected Attributes inherited from inviwo::StandardFactory< Representation, RepresentationFactoryObject< Representation >, std::type_index, const Representation::ReprOwner * >
Map 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.


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