Mantid
Loading...
Searching...
No Matches
IArchiveSearch.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/DllConfig.h"
13#include "Result.h"
14
15#ifndef Q_MOC_RUN
16#include <memory>
17#endif
18#include <filesystem>
19#include <set>
20#include <string>
21#include <vector>
22
23#define DECLARE_ARCHIVESEARCH(classname, facility) \
24 namespace { \
25 Mantid::Kernel::RegistrationHelper register_archive_##facility( \
26 ((Mantid::API::ArchiveSearchFactory::Instance().subscribe<classname>(#facility)), 0)); \
27 }
28
29namespace Mantid {
30namespace API {
31
38class MANTID_API_DLL IArchiveSearch {
39public:
41 virtual ~IArchiveSearch() = default;
49 virtual const Result<std::filesystem::path> getArchivePath(const std::set<std::string> &hintstrs,
50 const std::vector<std::string> &exts) const = 0;
51};
52
54using IArchiveSearch_sptr = std::shared_ptr<IArchiveSearch>;
55} // namespace API
56} // namespace Mantid
This class is an archive searching interface.
virtual const Result< std::filesystem::path > getArchivePath(const std::set< std::string > &hintstrs, const std::vector< std::string > &exts) const =0
Return the full path to a data file in an archive.
virtual ~IArchiveSearch()=default
Virtual destructor.
std::shared_ptr< IArchiveSearch > IArchiveSearch_sptr
Typedef for a shared pointer to an IArchiveSearch.
Helper class which provides the Collimation Length for SANS instruments.