IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ipsdk::processor::ProcessorFactory Class Reference

Factory singleton allowing dynamic creation of registred processors. More...

#include <ProcessorFactory.h>

Inheritance diagram for ipsdk::processor::ProcessorFactory:

Classes

struct  ProcessorInfo
 struct used to store processor informations More...
 

Public Member Functions

bool isRegistredProcessor (const std::string &className) const
 test if a given processor class is already registred
 
std::set< std::string > getRegistredProcessors () const
 retrieve collection of registred processor types
 
template<typename ProcessorType >
void registerProcessor ()
 register a new processor into factory More...
 
template<typename ProcessorType >
void unRegisterProcessor ()
 un register a previously registred processor from factory More...
 
const std::string & getProcessorName (const std::string &className) const
 retrieve name associated to a given processor class More...
 
const std::string & getProcessorToolTip (const std::string &className) const
 retrieve tooltip associated to a given processor class More...
 
const std::string & getProcessorLibraryName (const std::string &className) const
 retrieve library name associated to a given processor class More...
 
const boost::filesystem::path & getProcessorHeaderPath (const std::string &className) const
 retrieve header relative directory associated to a given processor class More...
 
ProcessorPtr createProcessor (const std::string &className) const
 create instance of a registered processor class More...
 

Static Public Member Functions

static ProcessorFactorygetInstance ()
 retrieve unique instance of factory
 

Protected Types

typedef std::map< std::string, ProcessorInfoFactoryMap
 map associating a class name to processor informations
 

Protected Member Functions

void registerProcessor (const std::string &className, const ProcessorInfo &processorInfo)
 register a new processor into factory More...
 
void unRegisterProcessor (const std::string &className)
 un register a previously registred processor from factory More...
 
Constructors and destructors
 ProcessorFactory ()
 
 ~ProcessorFactory ()
 

Protected Attributes

FactoryMap _factoryMap
 map storing string to processor informations association
 

Detailed Description

Factory singleton allowing dynamic creation of registred processors.

Author
E. Noirfalise
Date
2014/04/22

Member Function Documentation

◆ registerProcessor() [1/2]

template<typename ProcessorType >
void ipsdk::processor::ProcessorFactory::registerProcessor ( )
inline

register a new processor into factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(ProcessorType::getTypeName()) == true

◆ unRegisterProcessor() [1/2]

template<typename ProcessorType >
void ipsdk::processor::ProcessorFactory::unRegisterProcessor ( )
inline

un register a previously registred processor from factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(ProcessorType::getTypeName()) == false

◆ getProcessorName()

const std::string& ipsdk::processor::ProcessorFactory::getProcessorName ( const std::string &  className) const

retrieve name associated to a given processor class

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == false

◆ getProcessorToolTip()

const std::string& ipsdk::processor::ProcessorFactory::getProcessorToolTip ( const std::string &  className) const

retrieve tooltip associated to a given processor class

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == false

◆ getProcessorLibraryName()

const std::string& ipsdk::processor::ProcessorFactory::getProcessorLibraryName ( const std::string &  className) const

retrieve library name associated to a given processor class

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == false

◆ getProcessorHeaderPath()

const boost::filesystem::path& ipsdk::processor::ProcessorFactory::getProcessorHeaderPath ( const std::string &  className) const

retrieve header relative directory associated to a given processor class

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == false

◆ createProcessor()

ProcessorPtr ipsdk::processor::ProcessorFactory::createProcessor ( const std::string &  className) const

create instance of a registered processor class

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == false

◆ registerProcessor() [2/2]

void ipsdk::processor::ProcessorFactory::registerProcessor ( const std::string &  className,
const ProcessorInfo processorInfo 
)
protected

register a new processor into factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(className) == true

◆ unRegisterProcessor() [2/2]

void ipsdk::processor::ProcessorFactory::unRegisterProcessor ( const std::string &  className)
protected

un register a previously registred processor from factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredProcessor(ProcessorType::getTypeName()) == false

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