Skip to content

Commit

Permalink
STYLE: Move ObjectFactorBase OverrideInformation to unnamed namespace
Browse files Browse the repository at this point in the history
`OverrideInformation` is just an internal implementation class type of
`ObjectFactorBase`, so it is not meant to be part of the interface of
ObjectFactorBase.
  • Loading branch information
N-Dekker authored and dzenanz committed Jan 4, 2023
1 parent 9d2c892 commit cdd5408
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 0 additions & 12 deletions Modules/Core/Common/include/itkObjectFactoryBase.h
Expand Up @@ -204,18 +204,6 @@ class ITKCommon_EXPORT ObjectFactoryBase : public Object
const char *
GetLibraryPath();

/** \class OverrideInformation
* \brief Internal implementation class for ObjectFactorBase.
* \ingroup ITKCommon
*/
struct OverrideInformation
{
std::string m_Description;
std::string m_OverrideWithName;
bool m_EnabledFlag;
CreateObjectFunctionBase::Pointer m_CreateObject;
};

/** Registers the specified internal factory only once, even when `RegisterInternalFactoryOnce<TFactory>()` is called
* multiple times (possibly even by multiple threads) for the very same factory. */
template <typename TFactory>
Expand Down
14 changes: 13 additions & 1 deletion Modules/Core/Common/src/itkObjectFactoryBase.cxx
Expand Up @@ -40,6 +40,18 @@

namespace
{
/** \class OverrideInformation
* \brief Internal implementation class for ObjectFactorBase.
* \ingroup ITKCommon
*/
struct OverrideInformation
{
std::string m_Description;
std::string m_OverrideWithName;
bool m_EnabledFlag;
itk::CreateObjectFunctionBase::Pointer m_CreateObject;
};


using FactoryListType = std::list<itk::ObjectFactoryBase *>;

Expand Down Expand Up @@ -718,7 +730,7 @@ ObjectFactoryBase::RegisterOverride(const char * classOverride,
bool enableFlag,
CreateObjectFunctionBase * createFunction)
{
ObjectFactoryBase::OverrideInformation info;
OverrideInformation info;

info.m_Description = description;
info.m_OverrideWithName = subclass;
Expand Down

0 comments on commit cdd5408

Please sign in to comment.