Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::Geometry::IDFObject Class Reference

Concrete IDF Object. More...

#include <IDFObject.h>

Inheritance diagram for Mantid::Geometry::IDFObject:
Mantid::Geometry::AbstractIDFObject

Public Member Functions

bool exists () const override
 Check that the file exists. More...
 
std::string getExtension () const override
 Gets the extension of this IDF file, including the leading period. More...
 
const Poco::Path & getFileFullPath () const override
 Getter for the full file path. More...
 
const std::string & getFileFullPathStr () const override
 
std::string getFileNameOnly () const override
 Gets the filename for the FileObject. More...
 
std::string getMangledName () const override
 Gets the idf file as a mangled name. More...
 
const Poco::Path getParentDirectory () const override
 Gets the parent directory of the file. More...
 
 IDFObject (const std::string &fileName)
 Constructor. More...
 
- Public Member Functions inherited from Mantid::Geometry::AbstractIDFObject
 AbstractIDFObject ()=default
 
virtual bool exists () const =0
 
virtual std::string getExtension () const =0
 
virtual const Poco::Path & getFileFullPath () const =0
 
virtual const std::string & getFileFullPathStr () const =0
 
virtual std::string getFileNameOnly () const =0
 
virtual std::string getMangledName () const =0
 
virtual const Poco::Path getParentDirectory () const =0
 
virtual ~AbstractIDFObject ()=default
 

Private Member Functions

 IDFObject (const IDFObject &)
 
IDFObjectoperator= (const IDFObject &)
 

Private Attributes

const Poco::Path m_cacheParentDirectory
 
const Poco::Path m_cachePath
 
const std::string m_cachePathStr
 
const Poco::File m_defFile
 
const bool m_hasFileName
 

Additional Inherited Members

- Static Public Member Functions inherited from Mantid::Geometry::AbstractIDFObject
static const std::string expectedExtension ()
 Returns the expected extension of an IDF file. More...
 

Detailed Description

Concrete IDF Object.

Definition at line 52 of file IDFObject.h.

Constructor & Destructor Documentation

◆ IDFObject() [1/2]

Mantid::Geometry::IDFObject::IDFObject ( const std::string &  fileName)

Constructor.

Definition at line 23 of file IDFObject.cpp.

◆ IDFObject() [2/2]

Mantid::Geometry::IDFObject::IDFObject ( const IDFObject )
private

Member Function Documentation

◆ exists()

bool Mantid::Geometry::IDFObject::exists ( ) const
overridevirtual

Check that the file exists.

Returns
True if it exists otherwise False.

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 75 of file IDFObject.cpp.

References m_defFile, and m_hasFileName.

◆ getExtension()

std::string Mantid::Geometry::IDFObject::getExtension ( ) const
overridevirtual

Gets the extension of this IDF file, including the leading period.

Returns
A string containing the extension for this file

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 53 of file IDFObject.cpp.

References m_cachePath.

◆ getFileFullPath()

const Poco::Path & Mantid::Geometry::IDFObject::getFileFullPath ( ) const
overridevirtual

Getter for the full file path.

Returns
Full file path.

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 39 of file IDFObject.cpp.

References m_cachePath.

◆ getFileFullPathStr()

const std::string & Mantid::Geometry::IDFObject::getFileFullPathStr ( ) const
overridevirtual

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 41 of file IDFObject.cpp.

References m_cachePathStr.

Referenced by getMangledName().

◆ getFileNameOnly()

std::string Mantid::Geometry::IDFObject::getFileNameOnly ( ) const
overridevirtual

Gets the filename for the FileObject.

Returns
filename only.

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 47 of file IDFObject.cpp.

References m_cachePath.

Referenced by getMangledName().

◆ getMangledName()

std::string Mantid::Geometry::IDFObject::getMangledName ( ) const
overridevirtual

Gets the idf file as a mangled name.

Returns
the idf file as a mangled name.

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 65 of file IDFObject.cpp.

References getFileFullPathStr(), getFileNameOnly(), Mantid::Kernel::ChecksumHelper::loadFile(), and Mantid::Kernel::ChecksumHelper::sha1FromString().

◆ getParentDirectory()

const Poco::Path Mantid::Geometry::IDFObject::getParentDirectory ( ) const
overridevirtual

Gets the parent directory of the file.

Returns
Parent directory path.

Implements Mantid::Geometry::AbstractIDFObject.

Definition at line 33 of file IDFObject.cpp.

References m_cacheParentDirectory.

◆ operator=()

IDFObject & Mantid::Geometry::IDFObject::operator= ( const IDFObject )
private

Member Data Documentation

◆ m_cacheParentDirectory

const Poco::Path Mantid::Geometry::IDFObject::m_cacheParentDirectory
private

Definition at line 69 of file IDFObject.h.

Referenced by getParentDirectory().

◆ m_cachePath

const Poco::Path Mantid::Geometry::IDFObject::m_cachePath
private

Definition at line 68 of file IDFObject.h.

Referenced by getExtension(), getFileFullPath(), and getFileNameOnly().

◆ m_cachePathStr

const std::string Mantid::Geometry::IDFObject::m_cachePathStr
private

Definition at line 70 of file IDFObject.h.

Referenced by getFileFullPathStr().

◆ m_defFile

const Poco::File Mantid::Geometry::IDFObject::m_defFile
private

Definition at line 66 of file IDFObject.h.

Referenced by exists().

◆ m_hasFileName

const bool Mantid::Geometry::IDFObject::m_hasFileName
private

Definition at line 67 of file IDFObject.h.

Referenced by exists().


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