-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DECLARE_FILELOADER_ALGORITHM macro. Refs #7263
- Loading branch information
1 parent
886d0b0
commit b846d13
Showing
4 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Code/Mantid/Framework/API/inc/MantidAPI/RegisterFileLoader.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef MANTID_API_REGISTERFILELOADER_H_ | ||
#define MANTID_API_REGISTERFILELOADER_H_ | ||
|
||
#include "MantidAPI/AlgorithmFactory.h" | ||
#include "MantidAPI/FrameworkManager.h" | ||
|
||
/** | ||
* DECLARE_FILELOADER_ALGORITHM should be used in place of the standard | ||
* DECLARE_ALGORITHM macro that both registers the algorithm as usual and subscribes it to the | ||
* registry held in the FrameworkManager | ||
*/ | ||
#define DECLARE_FILELOADER_ALGORITHM(classname) \ | ||
DECLARE_ALGORITHM(classname) \ | ||
namespace \ | ||
{\ | ||
Mantid::Kernel::RegistrationHelper \ | ||
reg_loader_##classname((Mantid::API::FrameworkManager::Instance().fileLoaderRegistry().subscribe(#classname), 0));\ | ||
} | ||
|
||
#endif /* MANTID_API_REGISTERFILELOADER_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters