28#ifndef itkObjectFactoryBase_h
29#define itkObjectFactoryBase_h
88 static std::list<LightObject::Pointer>
107#if !defined(ITK_LEGACY_REMOVE)
112 static constexpr InsertionPositionEnum INSERT_AT_POSITION = InsertionPositionEnum::INSERT_AT_POSITION;
136 size_t position = 0);
149 static std::list<ObjectFactoryBase *>
180 virtual std::list<std::string>
184 virtual std::list<std::string>
188 virtual std::list<std::string>
192 virtual std::list<bool>
197 SetEnableFlag(
bool flag,
const char * className,
const char * subclassName);
215 template <
typename TFactory>
219 struct FactoryRegistration
223 [[maybe_unused]]
static const FactoryRegistration staticFactoryRegistration = [] {
225 return FactoryRegistration{};
240 const char * subclass,
241 const char * description,
254 virtual std::list<LightObject::Pointer>
263 class ObjectFactoryBasePrivate;
287 void * m_LibraryHandle{};
288 unsigned long m_LibraryDate{};
289 std::string m_LibraryPath{};
Define API for object creation callback functions.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Create instances of classes using an object factory.
virtual void SetEnableFlag(bool flag, const char *className, const char *subclassName)
virtual std::list< std::string > GetClassOverrideDescriptions()
static void UnRegisterAllFactories()
static void StrictVersionCheckingOn()
static void UnRegisterFactory(ObjectFactoryBase *)
virtual const char * GetITKSourceVersion() const =0
~ObjectFactoryBase() override
const char * GetLibraryPath()
void PrintSelf(std::ostream &os, Indent indent) const override
static LightObject::Pointer CreateInstance(const char *itkclassname)
void RegisterOverride(const char *classOverride, const char *subclass, const char *description, bool enableFlag, CreateObjectFunctionBase *createFunction)
static void RegisterFactoryInternal(ObjectFactoryBase *)
virtual std::list< std::string > GetClassOverrideNames()
virtual void Disable(const char *className)
virtual LightObject::Pointer CreateObject(const char *itkclassname)
virtual std::list< LightObject::Pointer > CreateAllObject(const char *itkclassname)
static ObjectFactoryBasePrivate * m_PimplGlobals
virtual std::list< bool > GetEnableFlags()
static void DeleteNonInternalFactory(ObjectFactoryBase *)
static bool GetStrictVersionChecking()
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
const std::unique_ptr< OverrideMap > m_OverrideMap
static void LoadDynamicFactories()
virtual const char * GetDescription() const =0
static void SynchronizeObjectFactoryBase(void *objectFactoryBasePrivate)
static void StrictVersionCheckingOff()
static void RegisterInternalFactoryOnce()
static std::list< ObjectFactoryBase * > GetRegisteredFactories()
virtual bool GetEnableFlag(const char *className, const char *subclassName)
virtual std::list< std::string > GetClassOverrideWithNames()
static void SetStrictVersionChecking(bool)
static std::list< LightObject::Pointer > CreateAllInstance(const char *itkclassname)
itkGetGlobalDeclarationMacro(ObjectFactoryBasePrivate, PimplGlobals)
static void LoadLibrariesInPath(const char *)
Base class for most ITK classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....