27 #ifndef G2O_ROBUST_KERNEL_FACTORY_H 28 #define G2O_ROBUST_KERNEL_FACTORY_H 30 #include "../stuff/misc.h" 75 static void destroy();
85 void unregisterType(
const std::string& tag);
100 void fillKnownKernels(std::vector<std::string>& types)
const;
104 typedef std::map<std::string, AbstractRobustKernelCreator*>
CreatorMap;
132 #if defined _MSC_VER && defined G2O_SHARED_LIBS 133 # define G2O_ROBUST_KERNEL_FACTORY_EXPORT __declspec(dllexport) 134 # define G2O_ROBUST_KERNEL_FACTORY_IMPORT __declspec(dllimport) 136 # define G2O_ROBUST_KERNEL_FACTORY_EXPORT 137 # define G2O_ROBUST_KERNEL_FACTORY_IMPORT 141 #define G2O_REGISTER_ROBUST_KERNEL(name, classname) \ 142 extern "C" void G2O_ROBUST_KERNEL_FACTORY_EXPORT g2o_robust_kernel_##classname(void) {} \ 143 static g2o::RegisterRobustKernelProxy<classname> g_robust_kernel_proxy_##classname(#name); 145 #define G2O_USE_ROBUST_KERNEL(classname) \ 146 extern "C" void G2O_ROBUST_KERNEL_FACTORY_IMPORT g2o_robust_kernel_##classname(void); \ 147 static g2o::TypeFunctionProxy proxy_##classname(g2o_robust_kernel_##classname); void unregisterType(const std::string &tag)
RegisterRobustKernelProxy(const std::string &name)
Abstract interface for allocating a robust kernel.
CreatorMap _creator
look-up map for the existing creators
std::map< std::string, AbstractRobustKernelCreator * > CreatorMap
create robust kernels based on their human readable name
static RobustKernelFactory * instance()
return the instance
~RegisterRobustKernelProxy()
static RobustKernelFactory * factoryInstance
virtual ~AbstractRobustKernelCreator()
base for all robust cost functions
templatized creator class which creates graph elements
void registerRobustKernel(const std::string &tag, AbstractRobustKernelCreator *c)
virtual RobustKernel * construct()=0
RobustKernel * construct()