4
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
6
// SPDX - License - Identifier: GPL - 3.0 +
7
- #include " MantidKernel/NexusDescriptor .h"
7
+ #include " MantidKernel/LegacyNexusDescriptor .h"
8
8
#include " MantidLegacyNexus/NeXusException.hpp"
9
9
#include " MantidLegacyNexus/NeXusFile.hpp"
10
10
@@ -26,7 +26,7 @@ namespace Mantid::Kernel {
26
26
* involves simply checking for the signature if a HDF file at the start of the
27
27
* file
28
28
*/
29
- NexusDescriptor::NexusDescriptor (const std::string &filename)
29
+ LegacyNexusDescriptor::LegacyNexusDescriptor (const std::string &filename)
30
30
: m_filename(), m_extension(), m_firstEntryNameType(), m_rootAttrs(), m_pathsToTypes(), m_file(nullptr ) {
31
31
if (filename.empty ()) {
32
32
throw std::invalid_argument (" NexusDescriptor() - Empty filename '" + filename + " '" );
@@ -43,17 +43,19 @@ NexusDescriptor::NexusDescriptor(const std::string &filename)
43
43
}
44
44
}
45
45
46
- NexusDescriptor ::~NexusDescriptor () = default ;
46
+ LegacyNexusDescriptor ::~LegacyNexusDescriptor () = default ;
47
47
48
48
// / Returns the name & type of the first entry in the file
49
- const std::pair<std::string, std::string> &NexusDescriptor::firstEntryNameType () const { return m_firstEntryNameType; }
49
+ const std::pair<std::string, std::string> &LegacyNexusDescriptor::firstEntryNameType () const {
50
+ return m_firstEntryNameType;
51
+ }
50
52
51
53
/* *
52
54
* @param path A string giving a path using UNIX-style path separators (/), e.g.
53
55
* /raw_data_1, /entry/bank1
54
56
* @return True if the path exists in the file, false otherwise
55
57
*/
56
- bool NexusDescriptor ::pathExists (const std::string &path) const {
58
+ bool LegacyNexusDescriptor ::pathExists (const std::string &path) const {
57
59
return (m_pathsToTypes.find (path) != m_pathsToTypes.end ());
58
60
}
59
61
@@ -64,7 +66,7 @@ bool NexusDescriptor::pathExists(const std::string &path) const {
64
66
/* *
65
67
* Creates the internal cached structure of the file as a tree of nodes
66
68
*/
67
- void NexusDescriptor ::initialize (const std::string &filename) {
69
+ void LegacyNexusDescriptor ::initialize (const std::string &filename) {
68
70
m_filename = filename;
69
71
m_extension = std::filesystem::path (filename).extension ().string ();
70
72
@@ -84,8 +86,9 @@ void NexusDescriptor::initialize(const std::string &filename) {
84
86
* @param pmap [Out] An output map filled with mappings of path->type
85
87
* @param level An integer defining the current level in the file
86
88
*/
87
- void NexusDescriptor::walkFile (Mantid::LegacyNexus::File &file, const std::string &rootPath,
88
- const std::string &className, std::map<std::string, std::string> &pmap, int level) {
89
+ void LegacyNexusDescriptor::walkFile (Mantid::LegacyNexus::File &file, const std::string &rootPath,
90
+ const std::string &className, std::map<std::string, std::string> &pmap,
91
+ int level) {
89
92
if (!rootPath.empty ()) {
90
93
pmap.emplace (rootPath, className);
91
94
}
0 commit comments