g2o
Loading...
Searching...
No Matches
g2o::RobustKernelFactory Class Reference

create robust kernels based on their human readable name More...

#include <robust_kernel_factory.h>

Public Member Functions

 RobustKernelFactory (RobustKernelFactory const &)=delete
RobustKernelFactory & operator= (RobustKernelFactory const &)=delete
void registerRobustKernel (const std::string &tag, const AbstractRobustKernelCreator::Ptr &c)
void unregisterType (const std::string &tag)
RobustKernel * construct (const std::string &tag) const
AbstractRobustKernelCreator * creator (const std::string &tag) const
void fillKnownKernels (std::vector< std::string > &types) const

Static Public Member Functions

static RobustKernelFactory * instance ()
 return the instance
static void destroy ()
 free the instance

Protected Types

typedef std::map< std::string, AbstractRobustKernelCreator::Ptr > CreatorMap

Protected Member Functions

 RobustKernelFactory ()=default

Protected Attributes

CreatorMap _creator
 look-up map for the existing creators

Static Private Attributes

static std::unique_ptr< RobustKernelFactory > factoryInstance

Detailed Description

create robust kernels based on their human readable name

Definition at line 68 of file robust_kernel_factory.h.

Member Typedef Documentation

◆ CreatorMap

Definition at line 106 of file robust_kernel_factory.h.

Constructor & Destructor Documentation

◆ RobustKernelFactory() [1/2]

g2o::RobustKernelFactory::RobustKernelFactory ( RobustKernelFactory const & )
delete

◆ RobustKernelFactory() [2/2]

g2o::RobustKernelFactory::RobustKernelFactory ( )
protecteddefault

Member Function Documentation

◆ construct()

RobustKernel * g2o::RobustKernelFactory::construct ( const std::string & tag) const

construct a robust kernel based on its tag

Definition at line 66 of file robust_kernel_factory.cpp.

References _creator.

Referenced by operator=().

◆ creator()

AbstractRobustKernelCreator * g2o::RobustKernelFactory::creator ( const std::string & tag) const

return the creator for a specific tag

Definition at line 74 of file robust_kernel_factory.cpp.

References _creator.

Referenced by main(), operator=(), and MainWindow::setRobustKernel().

◆ destroy()

void g2o::RobustKernelFactory::destroy ( )
static

free the instance

Definition at line 91 of file robust_kernel_factory.cpp.

References factoryInstance.

Referenced by operator=().

◆ fillKnownKernels()

void g2o::RobustKernelFactory::fillKnownKernels ( std::vector< std::string > & types) const

get a list of all known robust kernels

Definition at line 83 of file robust_kernel_factory.cpp.

References _creator.

Referenced by main(), operator=(), and MainWindow::updateRobustKernels().

◆ instance()

RobustKernelFactory * g2o::RobustKernelFactory::instance ( )
static

◆ operator=()

◆ registerRobustKernel()

void g2o::RobustKernelFactory::registerRobustKernel ( const std::string & tag,
const AbstractRobustKernelCreator::Ptr & c )

register a tag for a specific creator

Definition at line 47 of file robust_kernel_factory.cpp.

References _creator, and G2O_WARN.

Referenced by operator=(), and g2o::RegisterRobustKernelProxy< T >::RegisterRobustKernelProxy().

◆ unregisterType()

void g2o::RobustKernelFactory::unregisterType ( const std::string & tag)

unregister a tag for a specific creator

Definition at line 59 of file robust_kernel_factory.cpp.

References _creator.

Referenced by operator=().

Member Data Documentation

◆ _creator

CreatorMap g2o::RobustKernelFactory::_creator
protected

look-up map for the existing creators

Definition at line 109 of file robust_kernel_factory.h.

Referenced by construct(), creator(), fillKnownKernels(), registerRobustKernel(), and unregisterType().

◆ factoryInstance

std::unique_ptr< RobustKernelFactory > g2o::RobustKernelFactory::factoryInstance
staticprivate

Definition at line 112 of file robust_kernel_factory.h.

Referenced by destroy(), and instance().


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