Skip to content

Commit

Permalink
STYLE: Move elxInstallComponentFunction macro defines from "elxMacro.h"
Browse files Browse the repository at this point in the history
...to "elxInstallAllComponents.h".

"elxInstallAllComponents.h" is the only source file that needs to have those macro's.
  • Loading branch information
N-Dekker committed Oct 28, 2021
1 parent f5a573d commit 7694040
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 41 deletions.
39 changes: 37 additions & 2 deletions Core/Install/elxInstallAllComponents.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,43 @@

#include "elxComponentDatabase.h"

/** The CMake generated files contain macros: */
#include "elxMacro.h"
// The CMake generated "elxInstallComponentFunction*.h" files contain calls to the following macros:

/**
* elxInstallComponentFunctionDeclarationMacro
*
* Usage example:
* elxInstallComponentFunctionDeclarationMacro( BSplineTransform );
*
* This macro declares the function implemented by
* the elxInstallMacro. This macro is used by the
* CMake generated file
* elxInstallComponentFunctionDeclarations.h
* only.
*
* Details: the declaration of InstallComponent function defined
* by elxInstallMacro is simply repeated.
*/
#define elxInstallComponentFunctionDeclarationMacro(_classname) \
extern "C" int _classname##InstallComponent(::elastix::ComponentDatabase * _cdb)

/**
* elxInstallComponentFunctionCallMacro
*
* Usage example:
* elxInstallComponentFunctionCallMacro( BSplineTransform );
*
* This macro calls the function implemented by
* the elxInstallMacro. This macro is used by the
* CMake generated file
* elxInstallComponentFunctionCalls.h
* only.
*
* Details: the InstallComponent function defined
* by elxInstallMacro is called.
*/
#define elxInstallComponentFunctionCallMacro(_classname) ret |= _classname##InstallComponent(_cdb)


/** The following file, generated by CMake, declares all
* the InstallComponent functions implemented by the components. */
Expand Down
39 changes: 0 additions & 39 deletions Core/Install/elxMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,45 +129,6 @@
return _InstallDummy##_classname; \
} // ignore semicolon

/**
* elxInstallComponentFunctionDeclarationMacro
*
* Usage example:
* elxInstallComponentFunctionDeclarationMacro( BSplineTransform );
*
* This macro declares the function implemented by
* the elxInstallMacro. This macro is used by the
* CMake generated file
* elxInstallComponentFunctionDeclarations.h
* only.
*
* Details: the declaration of InstallComponent function defined
* by elxInstallMacro is simply repeated.
*
* See also elxInstallAllComponents.h.
*/
#define elxInstallComponentFunctionDeclarationMacro(_classname) \
extern "C" int _classname##InstallComponent(::elastix::ComponentDatabase * _cdb)

/**
* elxInstallComponentFunctionCallMacro
*
* Usage example:
* elxInstallComponentFunctionCallMacro( BSplineTransform );
*
* This macro calls the function implemented by
* the elxInstallMacro. This macro is used by the
* CMake generated file
* elxInstallComponentFunctionCalls.h
* only.
*
* Details: the InstallComponent function defined
* by elxInstallMacro is called.
*
* See also elxInstallAllComponents.h.
*/
#define elxInstallComponentFunctionCallMacro(_classname) ret |= _classname##InstallComponent(_cdb)


/**
* elxClassNameMacro(_name)
Expand Down

0 comments on commit 7694040

Please sign in to comment.