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 <set>
19#include <string>
20#include <vector>
21
22#define DECLARE_ARCHIVESEARCH(classname, facility) \
23 namespace { \
24 Mantid::Kernel::RegistrationHelper register_archive_##facility( \
25 ((Mantid::API::ArchiveSearchFactory::Instance().subscribe<classname>(#facility)), 0)); \
26 }
27
28namespace Mantid {
29namespace API {
30
37class MANTID_API_DLL IArchiveSearch {
38public:
40 virtual ~IArchiveSearch() = default;
48 virtual const Result<std::string> getArchivePath(const std::set<std::string> &filenames,
49 const std::vector<std::string> &exts) const = 0;
50};
51
53using IArchiveSearch_sptr = std::shared_ptr<IArchiveSearch>;
54} // namespace API
55} // namespace Mantid
This class is an archive searching interface.
virtual const Result< std::string > getArchivePath(const std::set< std::string > &filenames, 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.