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