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::AttributeFactory Class Reference

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

#include <AttributeFactory.h>

Inheritance diagram for ipsdk::processor::AttributeFactory:

Classes

struct  AttributeInfo
 struct used to store attribute informations More...
 

Public Member Functions

bool isRegistredAttribute (const std::string &className) const
 test if a given attribute class is already registred
 
std::set< std::string > getRegistredAttributes () const
 retrieve collection of registred attribute types
 
template<typename AttributeType >
void registerAttribute ()
 register a new attribute into factory More...
 
template<typename AttributeType >
void unRegisterAttribute ()
 un register a previously registred attribute from factory More...
 
const std::string & getAttributeName (const std::string &className) const
 retrieve name associated to a given attribute class More...
 
const std::string & getAttributeToolTip (const std::string &className) const
 retrieve tooltip associated to a given attribute class More...
 
const std::string & getAttributeLibraryName (const std::string &className) const
 retrieve library name associated to a given attribute class More...
 
const boost::filesystem::path & getAttributeHeaderPath (const std::string &className) const
 retrieve header relative directory associated to a given attribute class More...
 
AttributePtr createAttribute (const std::string &className) const
 create instance of a registered attribute class More...
 

Static Public Member Functions

static AttributeFactorygetInstance ()
 retrieve unique instance of factory
 

Protected Types

typedef std::map< std::string, AttributeInfoFactoryMap
 map associating a class name to attribute informations
 

Protected Member Functions

void registerAttribute (const std::string &className, const AttributeInfo &attributeInfo)
 register a new attribute into factory More...
 
void unRegisterAttribute (const std::string &className)
 un register a previously registred attribute from factory More...
 
Constructors and destructors
 AttributeFactory ()
 
 ~AttributeFactory ()
 

Protected Attributes

FactoryMap _factoryMap
 map storing string to attribute informations association
 

Detailed Description

Factory singleton allowing dynamic creation of registred attributes.

Author
E. Noirfalise
Date
2014/04/18

Member Function Documentation

◆ registerAttribute() [1/2]

template<typename AttributeType >
void ipsdk::processor::AttributeFactory::registerAttribute ( )
inline

register a new attribute into factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredAttribute(AttributeType::getTypeName()) == true

◆ unRegisterAttribute() [1/2]

template<typename AttributeType >
void ipsdk::processor::AttributeFactory::unRegisterAttribute ( )
inline

un register a previously registred attribute from factory

Exceptions
ipsdk::IPSDKBaseProcessingExceptionif isRegistredAttribute(AttributeType::getTypeName()) == false

◆ getAttributeName()

const std::string& ipsdk::processor::AttributeFactory::getAttributeName ( const std::string &  className) const

retrieve name associated to a given attribute class

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

◆ getAttributeToolTip()

const std::string& ipsdk::processor::AttributeFactory::getAttributeToolTip ( const std::string &  className) const

retrieve tooltip associated to a given attribute class

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

◆ getAttributeLibraryName()

const std::string& ipsdk::processor::AttributeFactory::getAttributeLibraryName ( const std::string &  className) const

retrieve library name associated to a given attribute class

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

◆ getAttributeHeaderPath()

const boost::filesystem::path& ipsdk::processor::AttributeFactory::getAttributeHeaderPath ( const std::string &  className) const

retrieve header relative directory associated to a given attribute class

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

◆ createAttribute()

AttributePtr ipsdk::processor::AttributeFactory::createAttribute ( const std::string &  className) const

create instance of a registered attribute class

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

◆ registerAttribute() [2/2]

void ipsdk::processor::AttributeFactory::registerAttribute ( const std::string &  className,
const AttributeInfo attributeInfo 
)
protected

register a new attribute into factory

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

◆ unRegisterAttribute() [2/2]

void ipsdk::processor::AttributeFactory::unRegisterAttribute ( const std::string &  className)
protected

un register a previously registred attribute from factory

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

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