Mantid
|
A Helper class for easily writing nexus saving/loading tests. More...
#include <NexusTestHelper.h>
Public Member Functions | |
void | createFile (const std::string &barefilename) |
Creates a NXS file with an entry, for use in a test. More... | |
NexusTestHelper (bool deleteFile=true) | |
structor. More... | |
void | reopenFile () |
Close the newly created file and re-open it for reading back. More... | |
virtual | ~NexusTestHelper () |
Destructor. More... | |
Public Attributes | |
bool | deleteFile |
Do you delete when finished? More... | |
std::unique_ptr<::NeXus::File > | file |
Nexus file handle. More... | |
std::string | filename |
Created filename (full path) More... | |
A Helper class for easily writing nexus saving/loading tests.
Definition at line 26 of file NexusTestHelper.h.
NexusTestHelper::NexusTestHelper | ( | bool | deleteFile = true | ) |
structor.
Definition at line 29 of file NexusTestHelper.cpp.
|
virtual |
Destructor.
Close the NXS file and delete it.
Definition at line 35 of file NexusTestHelper.cpp.
References deleteFile, file, and filename.
void NexusTestHelper::createFile | ( | const std::string & | barefilename | ) |
Creates a NXS file with an entry, for use in a test.
barefilename | :: simple filename (no path) to save to. |
Definition at line 49 of file NexusTestHelper.cpp.
References file, filename, and Mantid::Kernel::SingletonHolder< T >::Instance().
void NexusTestHelper::reopenFile | ( | ) |
Close the newly created file and re-open it for reading back.
Definition at line 59 of file NexusTestHelper.cpp.
bool NexusTestHelper::deleteFile |
Do you delete when finished?
Definition at line 41 of file NexusTestHelper.h.
Referenced by ~NexusTestHelper().
std::unique_ptr<::NeXus::File> NexusTestHelper::file |
Nexus file handle.
Definition at line 35 of file NexusTestHelper.h.
Referenced by createFile(), reopenFile(), and ~NexusTestHelper().
std::string NexusTestHelper::filename |
Created filename (full path)
Definition at line 38 of file NexusTestHelper.h.
Referenced by createFile(), reopenFile(), and ~NexusTestHelper().