Mantid
Loading...
Searching...
No Matches
ICatalogInfo.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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#include "MantidKernel/DllConfig.h"
10#include <string>
11
12namespace Mantid {
13namespace Kernel {
14
17class MANTID_KERNEL_DLL ICatalogInfo {
18public:
20 virtual const std::string catalogName() const = 0;
22 virtual const std::string soapEndPoint() const = 0;
24 virtual const std::string externalDownloadURL() const = 0;
26 virtual const std::string catalogPrefix() const = 0;
28 virtual const std::string windowsPrefix() const = 0;
30 virtual const std::string macPrefix() const = 0;
32 virtual const std::string linuxPrefix() const = 0;
34 virtual ICatalogInfo *clone() const = 0;
36 virtual std::string transformArchivePath(const std::string &path) const;
37
39 virtual ~ICatalogInfo() = default;
40
41private:
43 std::string replacePrefix(const std::string &path, const std::string &regex, const std::string &prefix) const;
46 std::string replaceAllOccurences(const std::string &path, const std::string &search, const std::string &format) const;
47};
48
49} // namespace Kernel
50} // namespace Mantid
ICatalogInfo : An abstract class that holds information about catalogs.
Definition: ICatalogInfo.h:17
virtual ICatalogInfo * clone() const =0
Clone.
virtual const std::string catalogName() const =0
Obtain catalog name from the facility file.
virtual const std::string linuxPrefix() const =0
Obtain Linux prefix from facility file.
virtual const std::string macPrefix() const =0
Obtain Macintosh prefix from facility file.
virtual const std::string windowsPrefix() const =0
Obtain Windows prefix from the facility file.
virtual const std::string soapEndPoint() const =0
Obtain soap end point from the facility file.
virtual const std::string externalDownloadURL() const =0
Obtain the external download URL.
virtual ~ICatalogInfo()=default
virtual destructor
virtual const std::string catalogPrefix() const =0
Obtain the regex prefix from the facility file.
Helper class which provides the Collimation Length for SANS instruments.