Newer
Older
Roman Tolchenov
committed
#ifndef MANTID_API_IARCHIVESEARCH_H_
#define MANTID_API_IARCHIVESEARCH_H_
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
Gigg, Martyn Anthony
committed
#include "MantidAPI/DllConfig.h"
Roman Tolchenov
committed
Roman Tolchenov
committed
#include <string>
#include <vector>
#include <set>
#define DECLARE_ARCHIVESEARCH(classname, facility) \
namespace { \
Mantid::Kernel::RegistrationHelper register_archive_##facility( \
((Mantid::API::ArchiveSearchFactory::Instance().subscribe<classname>( \
#facility)), \
0)); \
}
Roman Tolchenov
committed
namespace Mantid {
namespace API {
/**
This class is an archive searching interface.
@author Roman Tolchenov, Tessella plc
@date 27/07/2010
Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class MANTID_API_DLL IArchiveSearch {
public:
/// Virtual destructor
virtual ~IArchiveSearch() = default;
/**
* Return the full path to a data file in an archive. The first match is
* returned
* @param filenames :: A list of filenames (without extensions) to pass to
* the archive
* @param exts :: A list of extensions to check for in turn against each file
Roman Tolchenov
committed
*/
virtual std::string
getArchivePath(const std::set<std::string> &filenames,
const std::vector<std::string> &exts) const = 0;
};
Roman Tolchenov
committed
/// Typedef for a shared pointer to an IArchiveSearch
typedef boost::shared_ptr<IArchiveSearch> IArchiveSearch_sptr;
}
Roman Tolchenov
committed
}
#endif // MANTID_API_IARCHIVESEARCH_H_