Mantid
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
NexusTestHelper Class Reference

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...
 

Detailed Description

A Helper class for easily writing nexus saving/loading tests.

Author
Janik Zikovsky
Date
2011-09-07

Definition at line 26 of file NexusTestHelper.h.

Constructor & Destructor Documentation

◆ NexusTestHelper()

NexusTestHelper::NexusTestHelper ( bool  deleteFile = true)

structor.

Definition at line 29 of file NexusTestHelper.cpp.

◆ ~NexusTestHelper()

NexusTestHelper::~NexusTestHelper ( )
virtual

Destructor.

Close the NXS file and delete it.

Definition at line 35 of file NexusTestHelper.cpp.

References deleteFile, file, and filename.

Member Function Documentation

◆ createFile()

void NexusTestHelper::createFile ( const std::string &  barefilename)

Creates a NXS file with an entry, for use in a test.

Parameters
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().

◆ reopenFile()

void NexusTestHelper::reopenFile ( )

Close the newly created file and re-open it for reading back.

Definition at line 59 of file NexusTestHelper.cpp.

References file, and filename.

Member Data Documentation

◆ deleteFile

bool NexusTestHelper::deleteFile

Do you delete when finished?

Definition at line 41 of file NexusTestHelper.h.

Referenced by ~NexusTestHelper().

◆ file

std::unique_ptr<::NeXus::File> NexusTestHelper::file

Nexus file handle.

Definition at line 35 of file NexusTestHelper.h.

Referenced by createFile(), reopenFile(), and ~NexusTestHelper().

◆ filename

std::string NexusTestHelper::filename

Created filename (full path)

Definition at line 38 of file NexusTestHelper.h.

Referenced by createFile(), reopenFile(), and ~NexusTestHelper().


The documentation for this class was generated from the following files: