41 auto repo_ptr = ScriptRepositoryFactory::Instance().create(
"ScriptRepositoryImpl");
43 if (!repo_ptr->isValid())
46 std::vector<std::string> f_list = repo_ptr->
check4Update();
47 if (!f_list.empty()) {
48 std::stringstream info;
49 info <<
"Information about ScriptRepository:\n"
50 <<
" A more recent version of the following files was installed:\n";
51 for (
auto const &file : f_list) {
52 info <<
" * " << file <<
"\n";
54 info <<
"Please check these files before using them. "
55 <<
"Note: These files were configured for AutoUpdate.";
#define DECLARE_ALGORITHM(classname)
virtual std::vector< std::string > check4Update()=0
Connects to the remote repository checking for updates.
UpdateScriptRepository : Check the MantidWeb, for updates of the ScriptRepository.
void exec() override
Execute the algorithm.
int version() const override
Algorithm's version for identification.
void init() override
Initialize the algorithm's properties.
const std::string category() const override
Algorithm's category for identification.
void warning(const std::string &msg)
Logs at warning level.
std::shared_ptr< ScriptRepository > ScriptRepository_sptr
shared pointer to the function base class
Mantid::Kernel::SingletonHolder< ScriptRepositoryFactoryImpl > ScriptRepositoryFactory