Mantid
Loading...
Searching...
No Matches
UserCatalogInfo.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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 +
8
9namespace Mantid::Kernel {
10
11UserCatalogInfo::UserCatalogInfo(const ICatalogInfo &catInfo, const CatalogConfigService &catalogConfigService)
12 : m_catInfo(catInfo.clone()), m_mountPoint(catalogConfigService.preferredMountPoint()) {}
13
15 : m_catInfo(other.m_catInfo->clone()), m_mountPoint(other.m_mountPoint) {}
16
17const std::string UserCatalogInfo::catalogName() const { return m_catInfo->catalogName(); }
18
19const std::string UserCatalogInfo::soapEndPoint() const { return m_catInfo->soapEndPoint(); }
20
21const std::string UserCatalogInfo::externalDownloadURL() const { return m_catInfo->externalDownloadURL(); }
22
23const std::string UserCatalogInfo::catalogPrefix() const { return m_catInfo->catalogPrefix(); }
24
25const std::string UserCatalogInfo::windowsPrefix() const {
26 if (m_mountPoint) {
27 return m_mountPoint.get();
28 }
29 return m_catInfo->windowsPrefix();
30}
31
32const std::string UserCatalogInfo::macPrefix() const {
33 if (m_mountPoint) {
34 return m_mountPoint.get();
35 }
36 return m_catInfo->macPrefix();
37}
38
39const std::string UserCatalogInfo::linuxPrefix() const {
40 if (m_mountPoint) {
41 return m_mountPoint.get();
42 }
43 return m_catInfo->linuxPrefix();
44}
45
47
48} // namespace Mantid::Kernel
ICatalogInfo : An abstract class that holds information about catalogs.
Definition: ICatalogInfo.h:17
UserCatalogInfo : Takes catalog info from the facility (via CatalogInfo), but provides the ability to...
const std::string externalDownloadURL() const override
Obtain the external download URL.
UserCatalogInfo * clone() const override
Clone.
const std::string soapEndPoint() const override
Obtain soap end point from the facility file.
UserCatalogInfo(const ICatalogInfo &catInfo, const CatalogConfigService &catalogConfigService)
const std::string macPrefix() const override
Obtain Macintosh prefix from facility file.
const std::string windowsPrefix() const override
Obtain Windows prefix from the facility file.
const std::string catalogPrefix() const override
Obtain the regex prefix from the facility file.
const std::string catalogName() const override
Obtain catalog name from the facility file.
const std::unique_ptr< ICatalogInfo > m_catInfo
Facility catalog info. Aggregation only solution here.
const std::string linuxPrefix() const override
Obtain Linux prefix from facility file.
const OptionalPath m_mountPoint
Archive mount point.